Skip to content
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

Generate local cache mutations #2311

Merged
merged 39 commits into from
Jun 14, 2022
Merged

Conversation

AnthonyMDev
Copy link
Contributor

@AnthonyMDev AnthonyMDev commented Jun 13, 2022

Generate Local Cache Mutation Templates!

Also needed to strip the @apollo_client_ios_localCacheMutation directive from the definition we send in the network request. While doing that, I did some clean up to the code that adds the __typename field. This way we just make one pass to convert the client definition into one suitable for sending to the server. Also added tests for that!

# Conflicts:
#	Apollo.xcodeproj/project.pbxproj
#	Sources/ApolloAPI/LocalCacheMutation.swift
# Conflicts:
#	Sources/ApolloAPI/LocalCacheMutation.swift
@netlify
Copy link

netlify bot commented Jun 13, 2022

Deploy Preview for apollo-ios-docs ready!

Name Link
🔨 Latest commit ea4c4a3
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docs/deploys/62a8ecbf001ebf0008da686b
😎 Deploy Preview https://deploy-preview-2311--apollo-ios-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@AnthonyMDev AnthonyMDev force-pushed the 1.0/generate-local-mutations branch from dfec4ec to 865de2a Compare June 13, 2022 20:55
Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a comment re. this in one of the TS test files but we need to consider the implication of stripping things from the query string on Operation Safelisting. I feel like it may force us to implement the safelisting logic in apollo-ios because our client is the only one that would understand the local-only directives.

* Add resolution of inclusion conditions for conditional fragment conversion

* Generate inclusion conditions on Fragment Gettters
@AnthonyMDev AnthonyMDev force-pushed the 1.0/generate-local-mutations branch from 5d040a8 to 0be4705 Compare June 14, 2022 18:43
@AnthonyMDev AnthonyMDev merged commit 55623fe into release/1.0 Jun 14, 2022
@AnthonyMDev AnthonyMDev deleted the 1.0/generate-local-mutations branch June 14, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants