graphql-config-utilities
Common utilities for graphql-config
Last updated 7 months ago by shopify-dep .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install graphql-config-utilities 
SYNC missed versions from official npm registry.

graphql-tool-utilities

Common utilities for graphql-config

Installation

npm install graphql-config-utilities --save

or, with Yarn:

yarn add graphql-config-utilities

Usage

Configuration

This utility reads schema information from a .graphqlconfig 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 schemaPath, 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

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

Example: multi-project configuration

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

Example: YAML format

schemaPath: build/schema.json
includes:
  - 'app/**/*.graphql'

Current Tags

  • 1.0.0                                ...           latest (7 months ago)

1 Versions

  • 1.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |