Energinet-DataHub / greenforce-frontend

GreenForce monorepo for the DataHub and Energy Origin frontends. Part of Energinet DataHub.
Apache License 2.0
72 stars 13 forks source link

Implement graphql-eslint #3501

Open ManBearTM opened 1 week ago

ManBearTM commented 1 week ago

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