Native Package Manager

    graphql-url-to-typescript

    0.0.1-11 • Public • Published

    graphql-url-to-typescript

    Generate TypeScript type definitions from an introspectable GraphQL server URL.

    NPM Version

    CLI

    $ graphql-url-to-typescript --help
     
      Usage: graphql-url-to-typescript [options] <url> [header]
     
      Generate TypeScript type definitions from an introspectable GraphQL server url.
     
     
      Options:
     
        -V, --version             output the version number
        -o, --output-file <path>  output file for generated type definitions, by default redirects to stdout
        -a, --no-field-arguments  remove the special property `$__arguments`
        -t, --no-field-types      remove the special properties `$__objects` and `$__scalars`
        -h, --help                output usage information
     
      Example:
     
        graphql-url-to-typescript -o ./github.d.ts https://api.github.com/graphql 'Authorization:Bearer <your GitHub personal access token>'
     
      Notes:
     
        `$__arguments` contains the type definitions of field arguments
        `$__scalars`   gathers the scalar properties of an interface
        `$__objects`   gathers the object properties of an interface

    Install

    npm i graphql-url-to-typescript

    DownloadsWeekly Downloads

    0

    Version

    0.0.1-11

    License

    MIT

    Last publish

    Collaborators

    • alexisfontaine