How to validate value/type of directive argument while schema validation? #1539
Answered
by
spawnia
LastDragon-ru
asked this question in
Q&A
-
I want to detect if the value of the argument has a valid type or not, eg in directive @a(a: String!) on FIELD_DEFINITION
type Query {
a: String @a(a: {a: 123})
} the expected error should be something like " But the schema passes the validation 😱 BuildSchema::build($schema)->assertValid(); // no error :( Am I missing something? |
Beta Was this translation helpful? Give feedback.
Answered by
spawnia
Mar 13, 2024
Replies: 1 comment 1 reply
-
I believe validation for this is simply not implemented as of now. The reference implementation graphql-js also seems to lack it - see graphql/graphql-js#1389. Since we base this library off of them, it just has not been added. Open for pull requests though! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LastDragon-ru
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe validation for this is simply not implemented as of now. The reference implementation graphql-js also seems to lack it - see graphql/graphql-js#1389. Since we base this library off of them, it just has not been added. Open for pull requests though!