graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
557 stars 71 forks source link

fix: Improve input validation on query execution #213

Closed josh18 closed 4 years ago

josh18 commented 4 years ago

@acao

acao commented 4 years ago

thanks @josh18, was meaning to get to this!

can you add ID to the known scalar types and validate for string?

see: http://spec.graphql.org/draft/#sec-Scalars

acao commented 4 years ago

ah, i can just add that myself later. thanks!

josh18 commented 4 years ago

:+1: thanks!

can you add ID to the known scalar types and validate for string?

Not sure how you are going to validate that, isn't the user input always a string?

acao commented 4 years ago

yes so you would then add a case statement for ID, that validates for string, though as you can see in the spec I linked to, it is expected to coerce from number or string. guess it’s not a big deal, but a user did request it already in another ticket