Our GraphQL backend is created using the Neo4j GraphQL driver for their Neo4j graph database. All we do is specify the GraphQL schema under libs/backend/adapter/neo4j
as *.schema.ts
files and the GraphQL API will be generated.
Anytime the *.schema.ts
file changes, we'll need to update the OGM types under shared/abstract/codegen
by running pnpm codegen
. These types are generated using the @neo4j/graphql-ogm
package, which is an ORM used for interacting with the database.
Our frontend uses *.graphql
files for queries and types, so anytime we edit a GraphQL, we'll want to run codegen to update those generated code as well. We use https://www.the-guild.dev/graphql/codegen for this part