You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use this awesome tool across various projects, some of which have large teams of developers that are frequently committing and pushing code.
One issue I've encountered is ensuring that frontend code that is deployed to staging/production environments is using the live backend schema. Since developers run a local backend when running code generation, it's possible that, by the time they push their frontend code, the backend is out of date and the schema for which they generated their types has changed.
To solve this, I run graphql-codegen --errors-only against the live backend in my CI to ensure that code referencing an out of date schema is not deployed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I use this awesome tool across various projects, some of which have large teams of developers that are frequently committing and pushing code.
One issue I've encountered is ensuring that frontend code that is deployed to staging/production environments is using the live backend schema. Since developers run a local backend when running code generation, it's possible that, by the time they push their frontend code, the backend is out of date and the schema for which they generated their types has changed.
To solve this, I run
graphql-codegen --errors-only
against the live backend in my CI to ensure that code referencing an out of date schema is not deployed.How do you handle this issue?
Beta Was this translation helpful? Give feedback.
All reactions