Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Field type Json has no validator defined #489

Open

Description

@marktani

Current behavior

Importing data to services with a Json field doesn't work. The error message

Field type Json has no validator defined

is returned.

Reproduction

Import data to a service that has a field of type Json or Json!.

Expected behavior?

It works.

Activity

  1. adrienbarreau commented on Mar 29, 2018

    @adrienbarreau

    any update on this one ? Is there an other way import data ?

  2. marcqualie commented on Apr 4, 2018

    @marcqualie

    Also hitting this issue, essentially making it so Graphcool has no working backup system since we can't restore a backup in production due to this import error

  3. GaelGRIFFON commented on Apr 12, 2018

    @GaelGRIFFON

    Same issue here...
    I think you just have to add here:
    https://github.com/graphcool/graphcool-framework/blob/0b80d3a8988fbaf6d9d4b2d55f2d586bc5e19e43/cli/packages/graphcool-cli-core/src/commands/import/Validator.ts#L41

    Json: (str) => {
        try {
            JSON.parse(str);
        } catch (e) {
            return false;
        }
        return true;
    }
    

    or something like that... (can't test here...)

    Edit: PR #513

  4. usulpro commented on Apr 23, 2018

    @usulpro

    Are there any workarounds?
    Will it work if I downgrage graphcool?
    Can't migrate my database to graphcool because of this :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions