-
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
31
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.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
84ebed5
Update `DeferredJsonMerger` to take `pending` and `completed` into ac…
BoD e7e17ae
Track pending fragment ids rather than completed ones.
BoD 3bc336a
Update more tests
BoD a466681
Add Apollo Server end-to-end tests
BoD f2b4179
Add a few more edge case tests
BoD 6bb062d
Fix missed test
BoD 891569f
Support appending lists in DeferredJsonMerger (for @stream)
BoD d5c8cb9
Rename DeferredJsonMerger -> IncrementalResultsMerger and DeferredFra…
BoD e327f81
Fix running tests hardcoded to true
BoD ad05aa0
Support both legacy and modern incremental delivery protocols, with a…
BoD eda7195
Simplify CI job
BoD bb1a83e
Do not expose accept headers in DefaultHttpRequestComposer's public API
BoD e608249
Make more symbols internal
BoD 26399de
Mark IncrementalDeliveryProtocol @ApolloExperimental
BoD 388c2ca
Rename Defer20220824 protocol to GraphQL17Alpha2 fpr consistency
BoD 69ecb14
Keep symbols public but deprecated
BoD 4d9b9f2
Let HttpNetworkTransport handle the Accept header
BoD 77c52fb
Rename Defer20220824 protocol to GraphQL17Alpha2 for consistency
BoD 5630434
Revert typealiases and use DeferredFragmentIdentifier again
BoD 5249d9c
Revert handling incremental results in WebSocket
BoD eb20af6
Default to `application/graphql-response+json, application/json` in D…
BoD 940f00f
Update package-lock.json
BoD 8e6c7f5
Rename incremental delivery protocol enum/classes to DraftInitial and…
BoD 8a77516
Update API dump
BoD 44f84c4
Update package-lock.json
BoD 40a9de7
Update the accept header with the value agreed upon
BoD 13d7de0
Clarify comment
BoD 6a4c28b
Rename incremental delivery protocol enums to V0_0 and V0_1
BoD 97177bd
Fix API Dump after rebase
BoD 97f29fb
Rename v0.0 -> v0.1 and v0.1 -> v0.2
BoD 8ede194
Update API dump
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.