greenforce-frontend icon indicating copy to clipboard operation
greenforce-frontend copied to clipboard

Implement graphql-eslint

Open ManBearTM opened this issue 5 months ago • 0 comments

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

ManBearTM avatar Sep 04 '24 08:09 ManBearTM