Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

graphql-config

kamilkisiela10.7mMIT5.1.3TypeScript support: included

The easiest way to configure your development environment with your GraphQL schema (supported by most tools, editors & IDEs)

graphql, config, relay, apollo

readme

GraphQLConf 2024 Banner: September 10-12, San Francisco. Hosted by the GraphQL Foundation

npm version code style: prettier renovate-app badge Discord Chat

GraphQL Config - one configuration for all your GraphQL tools (supported by most tools, editors & IDEs). The easiest way to configure your development environment with your GraphQL Schema.

As a developer, you gain simplicity and a central place to setup libraries, tools and your IDE extensions.

As a library author GraphQL Config makes it easier to maintain the code responsible for handling configuration, loading GraphQL schemas or even files with GraphQL operations and fragments. GraphQL Config provides a set of useful methods and an easy-to-work-with API.

Example

schema: ./schema.json
documents: ./src/components/**/*.jsx

Installation and Usage

Visit our website graphql-config.com to learn more about the GraphQL Config.

Help & Community

Join our Discord chat if you run into issues or have questions. We love talking to you!

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

And if this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Code of Conduct

Help us keep GraphQL Config open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant

License

GitHub license

MIT

changelog

Change log

5.1.3

Patch Changes

5.1.2

Patch Changes

5.1.1

Patch Changes

5.1.0

Minor Changes

Patch Changes

  • #1418 658f984 Thanks @dimaMachina! - should not throw pattern is too long from minimatch dependency when SDL schema contain more than 65536 characters

5.0.3

Patch Changes

  • #1406 69afec4 Thanks @B2o5T! - fix SchemaPointer type, allow both URLs with headers and local type definitions

5.0.2

Patch Changes

5.0.1

Patch Changes

5.0.0

Major Changes

Patch Changes

4.5.0

Minor Changes

4.4.1

Patch Changes

  • #1245 bad5090 Thanks @B2o5T! - fix peerDependenciesMeta was not included in package.json

4.4.0

Minor Changes

4.3.6

Patch Changes

  • #1149 a12f394 Thanks @charlypoly! - conflict with codegen also using TypeScriptLoader(), causing a double ts-node register.

4.3.5

Patch Changes

4.3.4

Patch Changes

4.3.3

Patch Changes

  • cd7747e: bump cosmiconfig-typescript-loader to resolve errors with esm loading

4.3.2

Patch Changes

  • f74d648: fix: change to maintained version of cosmiconfig-typescript-loader

4.3.1

Patch Changes

  • 44eec8d: Add workaround for default import of typescript config loader to fix ESM support

4.3.0

Minor Changes

  • aaccd04: feat: improve types to fix JSON schema when schema is passed like object with headers

Patch Changes

  • 18d07fd: fix: rollback GraphQLConfig.projects to empty object instead Object.create(null)

4.2.0

Minor Changes

  • 0636e9a: feat: support graphql.config.cjs config
  • 55f078a: feat: update graphql-tools packages

Patch Changes

  • fix: update minimatch dependency

Thanks to @bfanger for his first contribution 0636e9a

vNEXT

v4.0.2

  • Update range of @graphql-tools/merge dependency to include v7 and v8

v4.0.1

  • Updated dependencies of graphql-tools to latest, to address issues related to documents loading.

v4.0.0

‼️ ‼️ ‼️ BREAKING CHANGE ‼️ ‼️ ‼️

Dropped Node 10 support, due to the need to support ESM in this package.

‼️ ‼️ ‼️ BREAKING CHANGE ‼️ ‼️ ‼️

The signature of Loader has been changed in graphql-tools, to allow more flexibility.

If you are using graphql-config with extensions, then the Extension you are using needs to adjust to the new return value of Loader signature that returns Source[] | null instead of Source. (see: https://github.com/kamilkisiela/graphql-config/issues/716)

Other changes:

  • ESM Support
  • Update dependencies of graphql-tools.

v3.4.0

Note: A breaking chnage snuk into that version, please see v4.

  • Update dependencies of graphql-tools.

v3.3.0

v3.2.0

  • Allow custom options for loadSchema #593

v3.1.0

v3.0.2

  • Fix missing types #542

v3.0.1

  • use GraphQL Toolkit v0.10.6

v3.0.0

Read the Migration chapter

  • Support GraphQL v15
  • Support CommonJS and ES Modules
  • Support environment variables with default values
  • Match a file with a GraphQL Project
  • JSON Schema
  • New Extensions system with Loaders
  • includes and excludes becomes include and exlude
  • New field documents - defines GraphQL Operations and Fragments
  • Broader spectrum of config file names
  • Support custom config name
  • Synchonous version
  • Support legacy #437
  • Extensions capable of modifying GraphQL Schemas #463

Prior to v3

Changes: https://github.com/kamilkisiela/graphql-config/releases