-
Notifications
You must be signed in to change notification settings - Fork 1.1k
1210 deferred aligned with apollo #1221
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
38dfab1
Added @Override as part of errorprone code health check
bbakerman a90a885
Revert "Added @Override as part of errorprone code health check"
bbakerman 2653ea0
Merge remote-tracking branch 'upstream/master'
bbakerman ead56c4
Merge remote-tracking branch 'upstream/master'
bbakerman c893cee
Merge remote-tracking branch 'upstream/master'
bbakerman 654fd8f
Merge remote-tracking branch 'upstream/master'
bbakerman bb2b874
Merge remote-tracking branch 'upstream/master'
bbakerman d149b85
Merge remote-tracking branch 'upstream/master'
bbakerman e4f451c
Merge remote-tracking branch 'upstream/master'
bbakerman 79a4df8
Merge remote-tracking branch 'upstream/master'
bbakerman b116476
Merge remote-tracking branch 'upstream/master'
bbakerman d652315
Merge remote-tracking branch 'upstream/master'
bbakerman 9e59603
Merge remote-tracking branch 'upstream/master'
bbakerman 0789d60
Making @defer return null as a place holder and also the path in the …
bbakerman fe3785f
Missing tests
bbakerman e080d61
Documentation updates on defer
bbakerman 2d5aa2e
Merge remote-tracking branch 'upstream/master' into 1210-deferred-ali…
bbakerman 54b32a7
Updated tests
bbakerman ac85a4b
Build thy self
bbakerman 36af569
try to deploy this branch
andimarek 5d381dd
try to deploy this branch
andimarek fdefa43
try to deploy this branch
andimarek eef571c
experimental change in offer behaviour
andimarek efbcf37
run also testng tests
andimarek 1958b21
Merge master onto this branch plus fix ups
bbakerman ad5f6b1
Fix ups after merge
bbakerman 648b896
Fixed test since @defer is now opt in
bbakerman 64cfd3f
moar test fix ups
bbakerman f3c8bb5
PR fixups
bbakerman 75fb184
Add multi paet http @defer support into local example
bbakerman cbcee57
why do we hae testng - reactive
bbakerman a9a9839
if argument should be non null
bbakerman 0c1083d
travis build back to master
bbakerman 6553be8
Merge remote-tracking branch 'upstream/master' into 1210-deferred-ali…
bbakerman 2364635
reverted the non null ness
bbakerman e1169db
Merge remote-tracking branch 'upstream/master' into 1210-deferred-ali…
bbakerman cff93c3
Made the if argument non nullable
bbakerman b2193af
Merged upstream master
bbakerman 7e27cae
ending \n
bbakerman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package graphql; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * Results that come back from @defer fields have an extra path property that tells you where | ||
| * that deferred result came in the original query | ||
| */ | ||
| @PublicApi | ||
| public interface DeferredExecutionResult extends ExecutionResult { | ||
|
|
||
| /** | ||
| * @return the execution path of this deferred result in the original query | ||
| */ | ||
| List<Object> getPath(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| package graphql; | ||
|
|
||
| import graphql.execution.ExecutionPath; | ||
|
|
||
| import java.util.Collections; | ||
| import java.util.LinkedHashMap; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import static graphql.Assert.assertNotNull; | ||
|
|
||
| /** | ||
| * Results that come back from @defer fields have an extra path property that tells you where | ||
| * that deferred result came in the original query | ||
| */ | ||
| @PublicApi | ||
| public class DeferredExecutionResultImpl extends ExecutionResultImpl implements DeferredExecutionResult { | ||
|
|
||
| private final List<Object> path; | ||
|
|
||
| private DeferredExecutionResultImpl(List<Object> path, ExecutionResultImpl executionResult) { | ||
| super(executionResult); | ||
| this.path = assertNotNull(path); | ||
| } | ||
|
|
||
| /** | ||
| * @return the execution path of this deferred result in the original query | ||
| */ | ||
| public List<Object> getPath() { | ||
| return path; | ||
| } | ||
|
|
||
| @Override | ||
| public Map<String, Object> toSpecification() { | ||
| Map<String, Object> map = new LinkedHashMap<>(super.toSpecification()); | ||
| map.put("path", path); | ||
| return map; | ||
| } | ||
|
|
||
| public static Builder newDeferredExecutionResult() { | ||
| return new Builder(); | ||
| } | ||
|
|
||
| public static class Builder { | ||
| private List<Object> path = Collections.emptyList(); | ||
| private ExecutionResultImpl.Builder builder = ExecutionResultImpl.newExecutionResult(); | ||
|
|
||
| public Builder path(ExecutionPath path) { | ||
| this.path = assertNotNull(path).toList(); | ||
| return this; | ||
| } | ||
|
|
||
| public Builder from(ExecutionResult executionResult) { | ||
| builder.from((ExecutionResultImpl) executionResult); | ||
| return this; | ||
| } | ||
|
|
||
| public Builder addErrors(List<GraphQLError> errors) { | ||
| builder.addErrors(errors); | ||
| return this; | ||
| } | ||
|
|
||
| public DeferredExecutionResult build() { | ||
| ExecutionResultImpl build = builder.build(); | ||
| return new DeferredExecutionResultImpl(path, build); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can this be null? => unboxing will cause NPE
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.
no - its default is true
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.
now made it non null as an arg declaration