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

Avoid running resolver code if root fragment throws with @required(action: THROW) #4799

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

captbaritone
Copy link
Contributor

I noticed a bug here. In order for the types generated by adding @required(action: THROW) to a resolver fragment to actually be safe, we need to short circuit and avoid calling the resolver function if the field has thrown.

This lays the ground work for the other bit we need, which is handling @throwOnFieldError errors and ensuring we never run a resolver with a fragment that should throw on read.

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants