-
Notifications
You must be signed in to change notification settings - Fork 31
Defer fragment support #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/main/java/com/intuit/graphql/orchestrator/batch/AuthDownstreamQueryModifier.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/batch/AuthDownstreamQueryModifier.java
Outdated
Show resolved
Hide resolved
| if(!node.getDirectives(DEFER_DIRECTIVE_NAME).isEmpty()) { | ||
| Argument deferArg = node.getDirectives(DEFER_DIRECTIVE_NAME).get(0).getArgument(DEFER_IF_ARG); | ||
| if(graphQLContext.getOrDefault(USE_DEFER, false) && (deferArg == null || ((BooleanValue)deferArg.getValue()).isValue())) { | ||
| decreaseParentSelectionSetCount(context.getParentContext()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood this correctly, USE defer is a feature flag? If yes, throwing an exception might be a good option as well. i.e. if feature is not enabled but someone use defer, we can throw an exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was assuming the feature flag would set hasDefer to false and forward to regular graphql execute to avoid clients queries breaking if we suddenly turn it off
|
|
||
| if(!node.getDirectives(DEFER_DIRECTIVE_NAME).isEmpty()) { | ||
| Argument deferArg = node.getDirectives(DEFER_DIRECTIVE_NAME).get(0).getArgument(DEFER_IF_ARG); | ||
| if(graphQLContext.getOrDefault(USE_DEFER, false) && (deferArg == null || ((BooleanValue)deferArg.getValue()).isValue())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this code is repeated
src/main/java/com/intuit/graphql/orchestrator/deferDirective/MultipartQueryRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/batch/GraphQLServiceBatchLoader.java
Show resolved
Hide resolved
1e9f643 to
7a0900e
Compare
What Changed
Why
Todo: