-
Notifications
You must be signed in to change notification settings - Fork 683
Implement @defer "June 2023" response format #6331
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
Open
BoD
wants to merge
21
commits into
main
Choose a base branch
from
defer-incremental-response-format-june-2023
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,727
−1,064
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
5792cef
Update `DeferredJsonMerger` to take `pending` and `completed` into ac…
BoD 25916b6
Track pending fragment ids rather than completed ones.
BoD 824cc85
Update more tests
BoD 8840a50
Add Apollo Server end-to-end tests
BoD 9f40011
Add a few more edge case tests
BoD 2259e5d
Fix missed test
BoD dccde73
Support appending lists in DeferredJsonMerger (for @stream)
BoD bb505c1
Rename DeferredJsonMerger -> IncrementalResultsMerger and DeferredFra…
BoD 072059a
Fix running tests hardcoded to true
BoD 989e122
Support both legacy and modern incremental delivery protocols, with a…
BoD a9bf9b2
Simplify CI job
BoD 8bf128d
Do not expose accept headers in DefaultHttpRequestComposer's public API
BoD 1dcd3b4
Make more symbols internal
BoD 48b18e4
Mark IncrementalDeliveryProtocol @ApolloExperimental
BoD b323879
Rename Defer20220824 protocol to GraphQL17Alpha2 fpr consistency
BoD 7fb253a
Keep symbols public but deprecated
BoD 35cef06
Let HttpNetworkTransport handle the Accept header
BoD 08c7a05
Rename Defer20220824 protocol to GraphQL17Alpha2 for consistency
BoD a14e3b3
Revert typealiases and use DeferredFragmentIdentifier again
BoD eec7001
Revert handling incremental results in WebSocket
BoD af5a3a4
Default to `application/graphql-response+json, application/json` in D…
BoD 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
Some comments aren't visible on the classic Files Changed page.
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
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
12 changes: 11 additions & 1 deletion
12
...ollo-api/src/commonMain/kotlin/com/apollographql/apollo/api/DeferredFragmentIdentifier.kt
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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package com.apollographql.apollo.api | ||
|
||
import com.apollographql.apollo.annotations.ApolloInternal | ||
|
||
data class DeferredFragmentIdentifier( | ||
/** | ||
* Path of the fragment in the overall JSON response. The elements can either be Strings (names) or Integers (array indices). | ||
*/ | ||
val path: List<Any>, | ||
val label: String?, | ||
) | ||
) { | ||
companion object { | ||
/** | ||
* Special identifier to signal that the identifiers are pending, as in the modern version of the protocol. | ||
*/ | ||
@ApolloInternal | ||
val Pending = DeferredFragmentIdentifier(emptyList(), "__pending") | ||
} | ||
} |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.