Tried posting on spectrum but seems like that was pretty much discontinued already at that time.
apollographql:master
← arnmishra:master
opened 11:13PM - 10 Mar 21 UTC
Fix #248
The current `required-fields` rule only checks that the required fi… elds exist on the top level fragment or query. However, if someone is using spread fragments, this doesn't recursively check all fragments.
The proposed solution in this PR only throws if the fragment or query has no spread fragment AND is missing the required field(s). This should work because at some point, the top-level spread fragment will be checked through the lint rule. As long as the top-level fragment has all required fields, all other fragments and queries that reference it will be covered as well.
First time contributor here, let me know if there are some explicit reasons not to include this. I tested it on my company's private repo and it worked as expected (and uncovered a few places an id was missing).
TODO:
- [x] Make sure all of the significant new logic is covered by tests
- [x] Rebase your changes on master so that they can be merged easily
- [x] Make sure all tests pass
- [x] Update CHANGELOG.md with your change
- [x] If this was a change that affects the external API, update the README (Not applicable)
Been open for a couple months, ready to be merged when its approved. Not sure if this is the right forum to post in though.
@arnmishra I don’t think anyone at Apollo is currently maintaining this project. I’ll find out and post back shortly. If we’re not, we’ll archive the repo and suggest a migration path.
1 Like
Hi @hwillson , any news from the Apollo team?