CLI Programmatic usage
@gqless/cli has also a complete programmatic API, which allows you to generate the client with custom scripts.
#
inspectWriteGenerateBasically calling CLI functionality programmatically.
All the fields are optional, and it will always read from the Configuration if any field is not specified.
#
writeGenerateIf you have direct access to the GraphQLSchema from graphql-js, you can give it to this function and it will do the rest.
All the GenerateOptions
are optional, and it will always read from the Configuration if any field is not specified.
#
generateIf you have direct access to the GraphQLSchema from graphql-js, you can give it to this function and it generates the code and simply return it.
All the GenerateOptions are optional, and it will always read from the Configuration if any field is not specified.
#
getRemoteSchemaInspect a remote GraphQL API
If the headers are not specified, it will look for Configuration.