The frontend uses the Apollo GraphQL client and graphql-codegen to access Hasura from the UI. We commit the generated source code to simplify deployment - otherwise we would need Hasura and the database running to build the UI. However, the generated source can become out-of-date if the database schema or hasura configuration changes, leading to errors in the UI.
We should add an action that runs the code generator and fails checking if it would make any code changes - indicating that the UI is out of sync with the schema.
See javascript/development.md for how to regenerate the graphql code. Hasura and the database will need to be running.
The frontend uses the Apollo GraphQL client and graphql-codegen to access Hasura from the UI. We commit the generated source code to simplify deployment - otherwise we would need Hasura and the database running to build the UI. However, the generated source can become out-of-date if the database schema or hasura configuration changes, leading to errors in the UI.
We should add an action that runs the code generator and fails checking if it would make any code changes - indicating that the UI is out of sync with the schema.
See
javascript/development.mdfor how to regenerate the graphql code. Hasura and the database will need to be running.