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 broken context type narrowing for virtual field resolvers #8741

Merged
merged 2 commits into from Aug 8, 2023

Conversation

acburdine
Copy link
Contributor

@acburdine acburdine commented Aug 6, 2023

closes #8740

graphql.Field supports the context type as a passthrough, so this PR passes through the inferred Context type.

Tested this via patch-package, it fixed the issue I had in #8740, though I'm not sure if there are other side-effects this type passthrough would have 🤔

@changeset-bot

This comment was marked as resolved.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 6, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1d080a8:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens self-assigned this Aug 6, 2023
@dcousens
Copy link
Member

dcousens commented Aug 8, 2023

Thanks @acburdine, I added a (previously) broken example that should help prevent a regression too 💚

@dcousens dcousens merged commit 1f666ea into keystonejs:main Aug 8, 2023
58 checks passed
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.

Broken Virtual Field Type Narrowing
2 participants