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

Error on empty selections after fragment argument transform #4908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tobias-tengler
Copy link
Contributor

@tobias-tengler tobias-tengler commented Feb 6, 2025

One of my colleagues contacted me today, because he received the following error from the compiler:

thread 'main' panicked at crates/relay-compiler/src/build_project/generate_artifacts.rs:153:13:
Expected at least one of an @updatable reader AST, or normalization AST to be present

After some debugging I found out this happens because an @include was removing all selections on a linked field, because it received a false constant through fragment arguments from a test operation.

This PR updates the fragment argument transform to report an appropriate error earlier, outlining the cause of the problem.

@facebook-github-bot
Copy link
Contributor

@lynnshaoyu 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