- You are curious
- We missed something in the interactive setup seriously, let us know! (opens in a new tab)
- You are a devOp or a sysadmin
> npx @gqty/cli [options] [endpoint...]
Add custom header during introspection, useful when your endpoint requires authentication.
> npx @gqty/cli -H "Authorization: Bearer <token>"
Forces React client generation regardless if you are using it.
react is found in the dependencies in your
Initialize a subscription client during code generation.
You may also specify
--subscriptions=graphql-sse if your GraphQL server uses
Server Side Events for subscriptions.
graphql-ws if subscriptions are found during introspection,
otherwise subscription client will be skipped.
Target path for the generated client.
Client generation will be skipped if target file already exists. To regenerate the client, delete your existing one or specify a new target.
You may specify a value as the path target for the generated client, e.g.
A schema file
schema.generated.ts will also be generated in the same
directory, running this command will always regenerate this schema file.
typescript is found in the dependencies in your
Watches for changes in specified endpoints, regenerates the schema when changes are detected.
URL endpoints will be polled with a dynamic interval derived as a running average of the last few regeneration, this prevents hanging up the machine when working with huge schemas.