nitintutlani / typed-graphql

Typescript type definitions for graphql [Not Active]
MIT License
37 stars 17 forks source link

in GraphQLScalarTypeConfig parseValue and parseLiteral fields are optional #5

Closed dimdimych closed 8 years ago

dimdimych commented 8 years ago

see http://graphql.org/docs/api-reference-type-system/#graphqlscalartype

dimdimych commented 8 years ago

Sorry, there's a run time error if these methods are missing

dimdimych commented 8 years ago

I think that we still need to add this commit: parseLiteral and parseValue are kind of optional: they should be either defined both at once or not defined at all. In GraphQL these fields are declared as optional, and the check is performed at run time: https://github.com/graphql/graphql-js/blob/master/src/type/definition.js#L254