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

relay-compiler --validate not working properly with persisted query generation #4665

Open
alex-statsig opened this issue Apr 4, 2024 · 0 comments

Comments

@alex-statsig
Copy link
Contributor

When relay-compiler --validate is run, typically any incorrect or missing artifacts lead to a non-zero exit code and no changes to the filesystem. I use this in a github workflow to ensure that the author ran relay before submitting the PR.

However, with persisted queries, it silently regenerates the file instead, and does not give any error.

I would expect any mismatches to not modify the filesystem, and instead exit with non-zero exit code. Otherwise a PR can corrupt this file without any validation error being flagged.

Additionally if possible, I would like for this comparison to ignore the order of keys in the file, although perhaps thats a separate discussion. My relay scripts sort the persisted queries by query name to minimize merge conflicts from query hashes moving around, so that would trigger an error potentially. Perhaps this should be built-in as a config option for generating the persisted queries file though.

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

No branches or pull requests

1 participant