exo graphql
The graphql
subcommand allows you to work with the GraphQL of your Exograph project.
Generating a new GraphQL schema
The graphql schema
subcommand creates a file with the GraphQL schema to use with tools like codegen. You invoke it from the project's root directory.
exo graphql schema
The command takes two optional arguments:
format
: The format of the output file. It can bejson
orgraphql
. The default isgraphql
.output
: The path to the output file. The default isgenerated/schema.graphql
if the format isgraphql
, andgenerated/schema.json
if the format isjson
.
For example, to generate a JSON schema and save it to my-schema.json
, you can run:
exo graphql schema --format json --output my-schema.json
To generate a GraphQL schema and save it to my-schema.graphql
, you can run:
exo graphql schema --format graphql --output my-schema.graphql