Common utilities for GraphQL developer tools

Usage no npm install needed!

<script type="module">
  import graphqlToolUtilities from '';



Build Status Build Status License: MIT npm version

Common utilities for GraphQL developer tools.


$ yarn add graphql-tool-utilities



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

Compiles the provided schema and document into an intermediary representation using 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).