JSPM

apollo

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 144361
  • Score
    100M100P100Q168370F
  • License MIT

CLI for apollographql

Package Exports

  • apollo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (apollo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

apollo-cli

CLI for the Apollo platform of tooling

Version CircleCI Appveyor CI Codecov Downloads/week License

Usage

$ npm install -g apollo
$ apollo COMMAND
running command...
$ apollo (-v|--version|version)
apollo/1.1.0 darwin-x64 node-v10.4.1
$ apollo --help [COMMAND]
USAGE
  $ apollo COMMAND
...

Commands

apollo codegen:generate [OUTPUT]

Generate static types for GraphQL queries.

USAGE
  $ apollo codegen:generate [OUTPUT]

ARGUMENTS
  OUTPUT  Path to write the generated code to

OPTIONS
  -h, --help                                 Show command help
  --addTypename                              Automatically add __typename to your queries
  --customScalarsPrefix=customScalarsPrefix  Include a prefix when using provided types for custom scalars
  --key=key                                  The API key for the Apollo Engine service
  --mergeInFieldsFromFragmentSpreads         Merge fragment fields onto its enclosing type
  --namespace=namespace                      The namespace to emit generated code into.

  --only=only                                Parse all input files, but only output generated code for the specified
                                             file [Swift only]

  --operationIdsPath=operationIdsPath        Path to an operation id JSON map file. If specified, also stores the
                                             operation ids (hashes) as properties on operation types [currently
                                             Swift-only]

  --passthroughCustomScalars                 Use your own types for custom scalars

  --queries=queries                          [default: **/*.graphql] Path to your GraphQL queries, can include search
                                             tokens like **

  --schema=schema                            Path to your GraphQL schema introspection result

  --tagName=tagName                          [default: gql] Name of the template literal tag used to identify template
                                             literals containing GraphQL queries in Javascript/Typescript code

  --target=target                            Type of code generator to use (swift | typescript | flow | scala), inferred
                                             from output

  --useFlowExactObjects                      Use Flow read only types for generated types [flow only]

  --useFlowReadOnlyTypes                     Use Flow read only types for generated types [flow only]

See code: src/commands/codegen/generate.ts

apollo help [COMMAND]

display help for apollo

USAGE
  $ apollo help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

apollo schema:check

Check a schema against the version registered in Apollo Engine.

USAGE
  $ apollo schema:check

OPTIONS
  -h, --help           Show command help
  --endpoint=endpoint  [default: http://localhost:4000/graphql] The URL of the server to fetch the schema from
  --header=header      Additional headers to send to server for introspectionQuery
  --json               Output result as JSON
  --key=key            The API key for the Apollo Engine service

See code: src/commands/schema/check.ts

apollo schema:checkQueries

Generate static types for GraphQL queries.

USAGE
  $ apollo schema:checkQueries

OPTIONS
  -h, --help         Show command help
  --key=key          The API key for the Apollo Engine service
  --queries=queries  [default: **/*.graphql] Path to your GraphQL queries, can include search tokens like **
  --schema=schema    Path to your GraphQL schema introspection result

  --tagName=tagName  [default: gql] Name of the template literal tag used to identify template literals containing
                     GraphQL queries in Javascript/Typescript code

See code: src/commands/schema/checkQueries.ts

apollo schema:download OUTPUT

Download the schema from your GraphQL endpoint.

USAGE
  $ apollo schema:download OUTPUT

ARGUMENTS
  OUTPUT  [default: schema.json] Path to write the introspection result to

OPTIONS
  -h, --help           Show command help
  --endpoint=endpoint  [default: http://localhost:4000/graphql] The URL of the server to fetch the schema from
  --header=header      Additional headers to send to server for introspectionQuery
  --key=key            The API key for the Apollo Engine service

See code: src/commands/schema/download.ts

apollo schema:publish

Publish a schema to Apollo Engine

USAGE
  $ apollo schema:publish

OPTIONS
  -h, --help           Show command help
  --endpoint=endpoint  [default: http://localhost:4000/graphql] The URL of the server to fetch the schema from
  --header=header      Additional headers to send to server for introspectionQuery
  --json               Output successful publish result as JSON
  --key=key            The API key for the Apollo Engine service

See code: src/commands/schema/publish.ts