-
Notifications
You must be signed in to change notification settings - Fork 743
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
GraphQLExecutionSource/DataDict/ObjectData Refactor #2990
Merged
Merged
Conversation
This file contains 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
✅ Deploy Preview for apollo-ios-docs canceled.
|
TODO: Cache Reference resolving
AnthonyMDev
commented
May 15, 2023
/// [aliased fields](https://spec.graphql.org/draft/#sec-Field-Alias) will be keyed on their | ||
/// alias name, not the name of the field on the schema type. | ||
/// | ||
/// 3. Because cache key resolution is performed both on raw JSON (from a network response or |
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.
Invert this paragraph for clarity
/// An opaque wrapper for data representing the value for a list field on a GraphQL object. | ||
/// This type wraps data from different sources, using a `_transformer` to ensure the raw data from | ||
/// different sources (which may be in different formats) can be consumed with a consistent API. | ||
public struct ListData { |
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.
Maybe make this conform to sequence for iterations?
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:
GraphQLExecutionSource
that is passed toGraphQLExecutor
.GraphQLExecutor
.ObjectData
protocol to use for wrapping the data from individual execution sources while completing cache key resolution.ObjectData
provide an opaque wrapper that lazily accesses and transforms the data for each execution source.SchemaConfiguration
will be changing to use the newObjectData
protocol. This is a very minor breaking change for most users during the next version upgrade. Detailed explanation and documentation will be included to minimize confusion and impact to users during the upgrade.DataDict
shape. Additional work and unit tests to ensure code generation addresses all edge cases will come in following PRs on this stack.DataDict
refactoring:fulfilledFragments
from the object data inDataDict
.fulfilledFragments
(and any other future metadata onSelectionSet
s) without polluting the object's data dictionary.Equatable
andHashable
conformance forDataDict
only check thedata
, not thefulfilledFragments
. This fixes Equality operator shows incorrect values based on value of "__fulfilled" #2944.DataDict
now uses a class for storage with copy-on-write value semantics.