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

4.2.0 • Public • Published

graphql-tool-utilities

Build Status Build Status License: MIT npm version

Common utilities for graphql-config.

Installation

yarn add graphql-config-utilities

Usage

Configuration

This utility reads schema information from a graphql-config config file in the project root. The configuration can contain one nameless project or many named projects. The configuration is compatible with the vscode-graphql extension. This extension provides syntax highlighting and autocomplete suggestions for graphql files.

Each project specifies a schema, include, and exclude globs. Glob patterns match paths relative to the location of the configuration file. Omit exclude if empty.

See the official specification documentation for more detail and examples.

Example: single nameless project configuration

{
  "schema": "build/schema/schema.json",
  "include": "app/**/*.graphql"
}

Example: multi-project configuration

{
  "projects": {
    "foo": {
      "schema": "build/schema/foo.json",
      "include": "app/foo/**/*.graphql"
    },
    "bar": {
      "schema": "build/schema/bar.json",
      "include": "app/bar/**/*.graphql"
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-config-utilities

Weekly Downloads

34,258

Version

4.2.0

License

MIT

Unpacked Size

19.4 kB

Total Files

15

Last publish

Collaborators

  • shopify-dep