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

Add inclusion conditions to generated Fragment Accessors #2312

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

AnthonyMDev
Copy link
Contributor

Fixes #2310

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'm going to layer my PRs on top of these. There are changes to templates and the new local cache mutation templates that I'll need to update with my changes.

@AnthonyMDev AnthonyMDev merged commit ec3f6b1 into 1.0/generate-local-mutations Jun 14, 2022
@AnthonyMDev AnthonyMDev deleted the 1.0/fragment-conditions branch June 14, 2022 18:23
AnthonyMDev added a commit that referenced this pull request Jun 14, 2022
* Create base API for cache writes

* WIP: Writing test for cache mutations

* Make DataDict mutable

* WIP: Cache Mutation Tests

* Remove mock mutable selection set

* Add _modify to DataDict

* Fixed some more tests

* Re-add MockMutableRootSelectionSet as protocol instead of class

* JSONDecodingError Equatable

* Test deletion of referenced record throws error

* Add default __typename get/setter to MutableRootSelectionSet

* Test for adding new entity reference to cache mutation

* Finished ReadWriteFromStoreTests Refactor

* Fix StoreConcurrencyTests

* Fix WatchQueryTests

* Fix SQLIteCacheTests

* Add other operations and fragments to supported locations for cache mutation directive

* Add operationType to LocalCacheMutation

* Create LocalCacheMutationDefinitionTemplate and break out shared code from OperationDefinitionTemplate

* Make MutableSelectionSet conform to SelectionSet

* Generate SelectionSet Mutable TypeName

* Generate mutable field accessors

* WIP

* Generate Named Fragment getter and setter

* Finish generation of mutable selection sets

* Generate Mutable Fragments

* Compile directives on FragmentDefinition

* Improve __typename addition functionality in frontend

* Pretty print actual rendered on template test failure

* Strip local cache mutation directive from source definition

* Fix bug where __typename was added to inline fragments in Frontend

* Make Fragment definition generate selection set as mutable for local cache mutations

* Generate Local Cache Mutations into separate folder

* Add inclusion conditions to generated Fragment Accessors (#2312)

* Add resolution of inclusion conditions for conditional fragment conversion

* Generate inclusion conditions on Fragment Gettters

* Test

* Add Mutable Typealiases to generated Schema. Clean up

* Fixes for code review comments
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