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

fix: Protect against missing typename fields on base types #368

Merged
merged 5 commits into from
Aug 18, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Aug 18, 2024

Follow-up to #102
Resolves #365

Summary

The differentiation when going from a narrow to a wide type can still cause confusion when the __typename field isn't included on the concrete/base type i.e. on the fragment that includes the abstract interface type.

This PR adds another optional __typename field to add disambiguation and avoid any confusion caused by this.

Set of changes

  • Disambiguate fragment spreads automatically using __typename?: PossibleType field

Copy link

changeset-bot bot commented Aug 18, 2024

🦋 Changeset detected

Latest commit: 40b735f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten changed the title Fix/protect against missing typename fields fix: Protect against missing typename fields on base types Aug 18, 2024
@kitten kitten marked this pull request as ready for review August 18, 2024 15:50
@kitten kitten merged commit ca8b441 into main Aug 18, 2024
2 checks passed
@kitten kitten deleted the fix/protect-against-missing-typename-fields branch August 18, 2024 16:00
@github-actions github-actions bot mentioned this pull request Aug 18, 2024
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.

Incorrect fragment type using interfaces
2 participants