-
Notifications
You must be signed in to change notification settings - Fork 69
feature: @fieldPolicy directive #735
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
BobaFetters
wants to merge
27
commits into
main
Choose a base branch
from
feature/field-policy
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
+3,279
−585
Conversation
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
Commiting the initial JS work that was done, before making changes to adjust how the field policies are handled from the JS side and add extra validation around lists.
# Conflicts: # apollo-ios-codegen/Sources/GraphQLCompiler/ApolloCodegenFrontendBundle.swift # apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/package-lock.json # apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/package.json
Checking in complete field policy functionality, need to do some code clean up and abstract some things into their own files, and add new SchemaConfiguration function
✅ Deploy Preview for apollo-ios-docc canceled.
|
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: c71967646c47073220e8cb8e |
AnthonyMDev
previously requested changes
Aug 26, 2025
Sources/AnimalKingdomAPI/animalkingdom-graphql/AnimalSchema.graphqls
Outdated
Show resolved
Hide resolved
Sources/UploadAPI/UploadAPI/Sources/Schema/SchemaConfiguration.swift
Outdated
Show resolved
Hide resolved
...o-ios-codegen/Sources/ApolloCodegenLib/FileGenerators/SchemaConfigurationFileGenerator.swift
Outdated
Show resolved
Hide resolved
apollo-ios-codegen/Sources/GraphQLCompiler/CompilationResult.swift
Outdated
Show resolved
Hide resolved
apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/coverage/clover.xml
Outdated
Show resolved
Hide resolved
Converted this to draft since it should have been that way to begin with, addressed feedback, still need to add a few tests around the |
# Conflicts: # apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/package-lock.json
Github actions migrated their mac runners to use macos-15 as the latest image now, which doesn't support Xcode 15.4, need to specify macos-14 runners until we are ready to drop Xcode 15.4
AnthonyMDev
previously requested changes
Sep 2, 2025
apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/src/utilities/fieldPolicyDirective.ts
Show resolved
Hide resolved
apollo-ios/Sources/Apollo/ExecutionSources/CacheDataExecutionSource.swift
Outdated
Show resolved
Hide resolved
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.
Adds support for the
@fieldPolicy
directive which allows users to configure what cache keys a specific field should use to look for data in the cache before potentially making a network request.Also adds two new functions to the
SchemaConfiguration
protocol to allow programmatic configuration of field policies.Note - have a couple of tests I am working on fixing but outside that the code is ready for review