Conversation
* Add apollo-graphql as a dependency (and project reference) * Remove apollo-engine-reporting as a dependency * Update sortAST to normalize order of fragments w.r.t operations * Tests are failing expectedly at this point
This update is exactly as expected. All fragments will now move to the beginning of a normalization result.
This is a valid use case for snapshots. Even better would be inline snapshots - something we can get to later.
These two operations will likely be used in tandem, and we want this to be consistent across consumers.
…iases and be less strict about removing literals.
…ew function, defaultOperationRegistrySignature. This new function is the effective interim fix, and the current existing function is now left alone.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 6, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 6, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 12, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 12, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 14, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 14, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 14, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
trevor-scheer
pushed a commit
to apollographql/apollo-server
that referenced
this pull request
May 14, 2020
This incorporates the changes from: apollographql/apollo-tooling#1112 ...which provides a new `defaultOperationRegistrySignature` function that will be utilized by both the CLI and this plugin to provide the same normalization.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR brings over a subset of the commits from #1027, in particular the ones which specifically touched
apollo-graphql. That PR should be referenced for communication and dialog around the review. This PR represents the direct result of running the following from that branch (which at the time I ran this was at 7714ee1):Specifically, this changes the
sortASTalgorithm to sort fragments at the top-level of theDocumentNode, providing a more deterministic normalization of the operation for use byapollo-engine-reporting(which consumes this package'sdefaultOperationRegistrySignaturefunction). This will more correctly combine operations for Engine reporting. This also adds adefaultOperationRegistrySignaturefunction for use by theapollo-server-plugin-operation-registryplugin to eventually consume.