java
installed on your machine to be able to run the yarn schemas
command, more precisely the openapi-generator
sub-command. Find more about the installation here.contentfulTypes.d.ts
that depends on contentful to be generated. The same goes for an openapi.yaml
file that comes from an external service.yarn install
the scripts will generate all the schemas and types for the project. It takes around ~45sec to generate all schemas, definitions types and open api schemas. The output is cached using NX to avoid re-generating all files again when no changes have been detected. It can go down up to ~5sec to run again.*.resolvers.ts
, *.dto.ts
, etc).workspace.json
to generate schemas and types.schemas/build-openapi
schemas/openapi-generator
schemas/build-graphql-schema
schemas/codegen
openApi.ts
file to define the document builder. Add this file at the root of the project along the index.ts
.buildOpenApi.ts
that will consume the previous file and generate the openapi.yaml
file.workspace.json
for the project.workspace.json
openapi.yaml
file generated from the previous script to run openapi-generator
..yaml
file comes from an outside source, don't name it openapi.yaml, otherwise it will be git ignored.workspace.json
's project.build-graphql-schema
script in workspace.json
so the CI can create the GraphQL schema in the pipeline without starting running the server:api.graphql
file.codegen.yml
file in your projectworkspace.json
schema.d.ts
, schema.tsx
, schema.ts
, possibleTypes.json
, fragmentTypes.json
to be ignored from git.