I can\'t get GraphQL to recognize the JSON scalar type.
I followed the [apollo docs] (http://dev.apollodata.com/tools/graphql-tools/scalars.html#Using-a-package) to
I resolved custom scalar JSON like this in resolvers
JSON: {
__serialize(value) {
return GraphQLJSON.parseValue(value);
} }
And It worked fine for me. I think it will help you
I couldn't get a custom scalar working with a text-based schema (using buildSchema('...')
from the core "graphql" library), but it worked when I built the schema programmatically from scratch (using new GraphQLSchema(...)
).