-
Notifications
You must be signed in to change notification settings - Fork 31
Defer query visitor #154
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
Defer query visitor #154
Conversation
...in/java/com/intuit/graphql/orchestrator/visitors/queryVisitors/DeferQueryCreatorVisitor.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/GraphQLOrchestrator.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/deferDirective/DeferUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/deferDirective/DeferUtil.java
Outdated
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/utils/NodeUtils.java
Outdated
Show resolved
Hide resolved
...om/intuit/graphql/orchestrator/visitors/queryVisitors/PruneChildDeferSelectionsModifier.java
Show resolved
Hide resolved
src/main/java/com/intuit/graphql/orchestrator/utils/MultiEIGenerator.java
Show resolved
Hide resolved
...in/java/com/intuit/graphql/orchestrator/visitors/queryVisitors/DeferQueryCreatorVisitor.java
Outdated
Show resolved
Hide resolved
| .selections(selections) | ||
| .build(); | ||
|
|
||
| if(parentNode instanceof Field) { |
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.
there should be a common parent.
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.
there is a common parent, but i am only checking to cast correctly and use transformer
...in/java/com/intuit/graphql/orchestrator/visitors/queryVisitors/DeferQueryCreatorVisitor.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| //Gets all the definitions for the fragment spreads | ||
| List<FragmentDefinition> fragmentSpreadDefs = neededFragmentSpreads |
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.
move to Util and see if BatchLoader also uses/needs something similar ?
...in/java/com/intuit/graphql/orchestrator/visitors/queryVisitors/DeferQueryCreatorVisitor.java
Outdated
Show resolved
Hide resolved
| ''').build() | ||
|
|
||
| ExecutionResult executionResult = specUnderTest.execute(petsEI, true).get() | ||
| DeferOptions deferOptions = DeferOptions.builder() |
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 like deferOptions class
| .map(OperationDefinition::getSelectionSet) | ||
| .map(SelectionSet::getSelections) | ||
| .flatMap(List::stream) | ||
| .forEach(selection -> { |
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.
sequence looks sweet
|
|
||
| @Builder | ||
| public class PruneChildDeferSelectionsModifier extends NodeVisitorStub { | ||
| private DeferOptions deferOptions; |
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.
final ?
What Changed
Why
Todo: