Understanding INPUT_OBJECT level custom directives #3418
Unanswered
justinsumida
asked this question in
Q&A
Replies: 1 comment
-
Yeah your challenge is that you want to act on the directive at runtime - eg during runtime. The main callback at runtime we have is of course the In fact the library https://github.com/graphql-java/graphql-java-extended-validation uses this extensively to validate that input objects are the right shape. if you look at this code you will see lots of examples making input object directives - who knows, it might even do what you are planning to do |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement an INPUT_OBJECT type directive to do some validation that 2 of 3 inputs are supplied on certain inputs. The problem I am running into is that using SchemaDirectiveWiring.onInputObjectType() only fires on the application starts. I also am not sure how to gain visibility into what fields were actually supplied in GraphQLInputObjectType to validate that 2 of 3 inputs were supplied.
Has anyone attempted to make an Input Object level directive before?
I am using version 17.3
Beta Was this translation helpful? Give feedback.
All reactions