greenforce-frontend
greenforce-frontend copied to clipboard
Implement graphql-eslint
Description
We have a had a few obscure bugs related to how Apollo merges results into the cache (such as this one). It turned out to be caused by missing ID's in types/selections. These kind of bugs are hard to catch and tricky to debug, so we would like to prevent this from happening. Luckily, we can enforce rules using graphql-eslint, that ensures types in the schema always have ID's (if possible) and if a type has an ID, it must be selected in operations.
Tasks
- [X] Add graphql-eslint to the project
- [ ] Fix linting errors in .graphql files