You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks a ton for this, it really helped me learn GraphQL. I wanted to suggest an addition in part 7 when you talk about creating custom scalar types for fine-grained validation. What you have there doesn't work at all if a query is using variables instead of arguments. That requires the validation to occur in parseValue instead of parseLiteral.
For example, if I have a custom scalar type defined using the docs you have currently (with only parseLiteral, this will be validated:
First of all, thanks a ton for this, it really helped me learn GraphQL. I wanted to suggest an addition in part 7 when you talk about creating custom scalar types for fine-grained validation. What you have there doesn't work at all if a query is using variables instead of arguments. That requires the validation to occur in
parseValue
instead ofparseLiteral
.For example, if I have a custom scalar type defined using the docs you have currently (with only
parseLiteral
, this will be validated:but this will not:
I'll submit a PR for this, hopefully it will clear things up for anyone using validation on queries with variables.
The text was updated successfully, but these errors were encountered: