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

Move Object Type to DataDict #2805

Merged
merged 5 commits into from
Feb 1, 2023
Merged

Conversation

AnthonyMDev
Copy link
Contributor

This PR moves the _objectType field from the SelectionSet protocol to the DataDict. This is in preparation for #2551, which will require the object type to be manually set by the generated initializers (instead of computed from the Schema config and __typename).

This PR also includes some refactoring of other API surfaces that will introduce minor breaking changes (mostly around APIs that are intended to be internal, but must be public for generated code consumption). Those changes are:

  • Get rid of AnySelectionSet completely
    • Since Swift unlocked existential types its not necessary anymore.
  • Introduce a new initializer for SelectionSet.init(unsafeData: variables).
  • Make DataDict initializer internal
    • It's use case is being replaced by the new initializer above.

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.

Existential's proving their worth already, nicely done!

@AnthonyMDev AnthonyMDev merged commit d124d96 into release/1.1 Feb 1, 2023
@AnthonyMDev AnthonyMDev deleted the object-type-on-data-dict branch February 1, 2023 21:55
AnthonyMDev added a commit that referenced this pull request Feb 14, 2023
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