Input Object Type

Hi, I try to save a post to mongo through graphql mutation. The post content is in json format from megadraft component, which built on top of draft.js. Do I have to specify the whole json data structure from megadraft at my graphql schema? Is there any generic input object type that accepts any object as input variable in graphql?

Thanks!

never mind. json is a string, so I can use the String type :slight_smile:

1 Like

You can use a custom JSON scalar! http://dev.apollodata.com/tools/graphql-tools/scalars.html#JSON-as-a-scalar

1 Like