Docs
Migration

Migration

Here we explain a new syntax and how to migrate from v2.0 to v3.0.

⚠️

LIBRARY AUTHORS. Legacy syntax (v2.0) is deprecated but still supported through the API of GraphQL Config v3.0. As a library author, you consume GraphQL Config API as usual, the legacy syntax is backported to a new one under the hood.

Migration Tool

We prepared a command-line tool to help you migrate your legacy GraphQL Config:

npx graphql-config-migrate

The migration tool will ask a few questions and move your config files to the new syntax.

New Syntax

schemaPath

Read “Usage” chapter to understand the schema field.

- schemaPath: "schema.graphql"
+ schema: "schema.graphql"

includes and excludes

Minor change here, remove the s at the end. The logic behind include and exclude stays the same but please read about it in “Usage” chapter.

- includes: "src/*.graphql"
+ include: "src/*.graphql"
- excludes: "tests/*.graphql"
+ exclude: "tests/*.graphql"

documents (new)

Read “Usage” chapter to understand new documents field.

+ documents: "ui/*.graphql"

extensions

No changes here, but please read the “Usage” chapter.

projects

No changes here, but please read the “Usage” chapter.