Skip to content

Clarify current ResolveAbstractType algorithm #973

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yaacovCR
Copy link
Contributor

add assertions from current behavior of reference implementation

@netlify
Copy link

netlify bot commented Jul 28, 2022

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit c15550f
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/62e274b0a805720008931fde
😎 Deploy Preview https://deploy-preview-973--graphql-spec-draft.netlify.app/draft
📱 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.

add assertions from reference implementation
@yaacovCR
Copy link
Contributor Author

This PR attempts to clarify the current behavior.

It can be seen as a prelude to #960 (which loosens the return type of the internal type system method to allow returning a transitive interface) -- but this PR might also be a helpful addition on its own.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Some bike-shedding suggestions 😅

benjie
benjie previously requested changes Jul 28, 2022
@benjie benjie dismissed their stale review July 28, 2022 12:09

Proposed changes are clearer

yaacovCR added a commit to yaacovCR/graphql-spec that referenced this pull request Aug 2, 2022
leebyron pushed a commit that referenced this pull request Sep 1, 2022
@leebyron
Copy link
Collaborator

leebyron commented Sep 1, 2022

Merged the dependent editorial change so you can use that change here.


This feels like a real ambiguity in the spec that's getting resolved, nice catch! Can we confirm that these assertions already align to existing GraphQL.js behavior?

@yaacovCR
Copy link
Contributor Author

yaacovCR commented Sep 1, 2022

@leebyron

This change is meant to capture existing behavior in graphql-js:

see fn ensureValidRuntimeType @
https://github.com/graphql/graphql-js/blob/a24a9f35b876bdd0d5050eca34d3020bd0db9a29/src/execution/execute.ts#L1234

@yaacovCR
Copy link
Contributor Author

yaacovCR commented Jan 5, 2023

@graphql/tsc ready for review

@yaacovCR
Copy link
Contributor Author

pinging @graphql/tsc on this

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Looks good to me! 🙌

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.

3 participants