graphql-tool-utilities
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.2 • Public • Published

    graphql-tool-utilities

    Build Status Build Status License: MIT npm version

    Common utilities for GraphQL developer tools.

    Installation

    $ yarn add graphql-tool-utilities

    Usage

    AST

    compile(schema: GraphQLSchema, document: DocumentNode, options?: CompilerOptions): AST

    Compiles the provided schema and document into an intermediary representation using https://github.com/apollographql/apollo-cli/blob/main/packages/apollo-codegen-core/src/compiler/legacyIR.ts. This intermediate representation makes it easy to navigate through operations and their fields, without having to manually traverse the document and associate fields with the schema manually.

    AST is our own improvement to the LegacyCompilerContext type definitions, but still fully backwards compatible with LegacyCompilerContext. See the TypeScript type definition for a detailed description of the returned AST type (or see LegacyCompilerContext inside the apollo-codegen-core module).

    Keywords

    none

    Install

    npm i graphql-tool-utilities

    DownloadsWeekly Downloads

    51,842

    Version

    2.1.2

    License

    MIT

    Unpacked Size

    10.7 kB

    Total Files

    16

    Last publish

    Collaborators

    • lemonmade
    • shopify-dep