UNPKG

7.68 kBJSONView Raw
1{"version":"1.7.1","commands":{"codegen:generate":{"id":"codegen:generate","description":"Generate static types for GraphQL queries. Can use the published schema in Apollo Engine or a downloaded schema.","pluginName":"apollo","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show command help"},"config":{"name":"config","type":"option","description":"Path to your Apollo config file"},"queries":{"name":"queries","type":"option","description":"Path to your GraphQL queries, can include search tokens like **","default":"**/*.graphql"},"schema":{"name":"schema","type":"option","description":"Path to your GraphQL schema (.graphql, .json, .js, .ts)"},"clientSchema":{"name":"clientSchema","type":"option","description":"Path to your client-side GraphQL schema file for `apollo-link-state` (.graphql, .json, .js, .ts)"},"key":{"name":"key","type":"option","description":"The API key for the Apollo Engine service"},"engine":{"name":"engine","type":"option","description":"Reporting URL for a custom Apollo Engine deployment","hidden":true},"target":{"name":"target","type":"option","description":"Type of code generator to use (swift | typescript | flow | scala), inferred from output"},"namespace":{"name":"namespace","type":"option","description":"The namespace to emit generated code into."},"passthroughCustomScalars":{"name":"passthroughCustomScalars","type":"boolean","description":"Use your own types for custom scalars"},"customScalarsPrefix":{"name":"customScalarsPrefix","type":"option","description":"Include a prefix when using provided types for custom scalars"},"addTypename":{"name":"addTypename","type":"boolean","description":"Automatically add __typename to your queries"},"operationIdsPath":{"name":"operationIdsPath","type":"option","description":"Path to an operation id JSON map file. If specified, also stores the operation ids (hashes) as properties on operation types [currently Swift-only]"},"mergeInFieldsFromFragmentSpreads":{"name":"mergeInFieldsFromFragmentSpreads","type":"boolean","description":"Merge fragment fields onto its enclosing type"},"useFlowExactObjects":{"name":"useFlowExactObjects","type":"boolean","description":"Use Flow exact objects for generated types [flow only]"},"useFlowReadOnlyTypes":{"name":"useFlowReadOnlyTypes","type":"boolean","description":"Use Flow read only types for generated types [flow only]"},"only":{"name":"only","type":"option","description":"Parse all input files, but only output generated code for the specified file [Swift only]"},"tagName":{"name":"tagName","type":"option","description":"Name of the template literal tag used to identify template literals containing GraphQL queries in Javascript/Typescript code","default":"gql"},"outputFlat":{"name":"outputFlat","type":"boolean","description":"By default, TypeScript/Flow will put each generated file in a directory next to its source file using the value of the \"output\" as the directory name. Set \"outputFlat\" to put all generated files in the directory relative to the current working directory defined by \"output\"."},"watch":{"name":"watch","type":"boolean","description":"Watch the query files to auto-generate on changes."}},"args":[{"name":"output","description":"Directory to which generated files will be written.\n- For TypeScript/Flow generators, this specifies a directory relative to each source file by default.\n- For TypeScript/Flow generators with the \"outputFlat\" flag is set, and for the Swift generator, this specifies a file or directory (absolute or relative to the current working directory) to which:\n - a file will be written for each query (if \"output\" is a directory)\n - all generated types will be written\n- For all other types, this defines a file (absolute or relative to the current working directory) to which all generated types are written."}]},"queries:check":{"id":"queries:check","description":"Checks your GraphQL operations for compatibility with the server. Checks against the published schema in Apollo Engine.","pluginName":"apollo","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show command help"},"config":{"name":"config","type":"option","description":"Path to your Apollo config file"},"queries":{"name":"queries","type":"option","description":"Path to your GraphQL queries, can include search tokens like **"},"json":{"name":"json","type":"boolean","description":"Output result as JSON"},"key":{"name":"key","type":"option","description":"The API key for the Apollo Engine service"},"engine":{"name":"engine","type":"option","description":"Reporting URL for a custom Apollo Engine deployment","hidden":true},"tagName":{"name":"tagName","type":"option","description":"Name of the template literal tag used to identify template literals containing GraphQL queries in Javascript/Typescript code","default":"gql"}},"args":[]},"schema:check":{"id":"schema:check","description":"Check a schema against the version registered in Apollo Engine.","pluginName":"apollo","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show command help"},"config":{"name":"config","type":"option","description":"Path to your Apollo config file"},"key":{"name":"key","type":"option","description":"The API key for the Apollo Engine service"},"engine":{"name":"engine","type":"option","description":"Reporting URL for a custom Apollo Engine deployment","hidden":true},"header":{"name":"header","type":"option","description":"Additional headers to send to server for introspectionQuery"},"endpoint":{"name":"endpoint","type":"option","description":"The URL of the server to fetch the schema from"},"json":{"name":"json","type":"boolean","description":"Output result as JSON"}},"args":[]},"schema:download":{"id":"schema:download","description":"Download the schema from your GraphQL endpoint.","pluginName":"apollo","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show command help"},"config":{"name":"config","type":"option","description":"Path to your Apollo config file"},"header":{"name":"header","type":"option","description":"Additional headers to send to server for introspectionQuery"},"endpoint":{"name":"endpoint","type":"option","description":"The URL of the server to fetch the schema from or path to ./your/local/schema.graphql"},"key":{"name":"key","type":"option","description":"The API key for the Apollo Engine service"},"engine":{"name":"engine","type":"option","description":"Reporting URL for a custom Apollo Engine deployment","hidden":true}},"args":[{"name":"output","description":"Path to write the introspection result to","required":true,"default":"schema.json"}]},"schema:publish":{"id":"schema:publish","description":"Publish a schema to Apollo Engine","pluginName":"apollo","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show command help"},"config":{"name":"config","type":"option","description":"Path to your Apollo config file"},"key":{"name":"key","type":"option","description":"The API key for the Apollo Engine service"},"engine":{"name":"engine","type":"option","description":"Reporting URL for a custom Apollo Engine deployment","hidden":true},"header":{"name":"header","type":"option","description":"Additional headers to send to server for introspectionQuery"},"endpoint":{"name":"endpoint","type":"option","description":"The URL of the server to fetch the schema from"},"json":{"name":"json","type":"boolean","description":"Output successful publish result as JSON"}},"args":[]}}}
\No newline at end of file