diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fdce490bd5c9..3a53d4cdf85cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,10 +8,14 @@ executors: image: type: string default: "14.15.0" + gatsby_major: + type: string + default: "4" docker: - image: cimg/node:<< parameters.image >> environment: GATSBY_CPU_COUNT: 2 + COMPILER_OPTIONS: GATSBY_MAJOR=<< parameters.gatsby_major >> aliases: e2e-executor-env: &e2e-executor-env @@ -197,6 +201,28 @@ jobs: - "packages/" - "node_modules/" + bootstrap_v5: + executor: + name: node + gatsby_major: "5" + steps: + - checkout + - run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|scripts/e2e-test.sh|yarn.lock" + # python 2 is not built in and node-gyp needs it to build lmdb + - run: sudo apt-get update && sudo apt-get install python -y + - <<: *restore_cache + - <<: *install_node_modules + - <<: *check_lockfile + - <<: *validate_renovate + - <<: *persist_cache + - run: yarn bootstrap -- concurrency=2 + # Persist the workspace again with all packages already built + - persist_to_workspace: + root: ./ + paths: + - "packages/" + - "node_modules/" + lint: executor: node steps: @@ -240,6 +266,13 @@ jobs: image: "18.2.0" <<: *test_template + unit_tests_node18_v5: + executor: + name: node + image: "18.2.0" + gatsby_major: "5" + <<: *test_template + integration_tests_gatsby_source_wordpress: machine: image: "ubuntu-2004:202107-02" @@ -668,3 +701,11 @@ workflows: branches: only: - master + + build-test_v5: + jobs: + - bootstrap_v5 + - unit_tests_node18_v5: + <<: *ignore_docs + requires: + - bootstrap_v5 diff --git a/packages/babel-plugin-remove-graphql-queries/src/__tests__/index.js b/packages/babel-plugin-remove-graphql-queries/src/__tests__/index.js index 8814eaeefb644..2291667c0e7c2 100644 --- a/packages/babel-plugin-remove-graphql-queries/src/__tests__/index.js +++ b/packages/babel-plugin-remove-graphql-queries/src/__tests__/index.js @@ -25,6 +25,8 @@ function transform(query, filename) { return code } +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip + describe(`babel-plugin-remove-graphql-queries`, () => { it.todo( `Works correctly with the kitchen sink` @@ -221,7 +223,7 @@ describe(`babel-plugin-remove-graphql-queries`, () => { `) }) - it(`Transforms queries in `, () => { + itWhenV4(`Transforms queries in `, () => { matchesSnapshot(` import * as React from 'react' import { graphql, StaticQuery } from 'gatsby' @@ -235,8 +237,10 @@ describe(`babel-plugin-remove-graphql-queries`, () => { `) }) - it(`Transforms queries defined in own variable in `, () => { - matchesSnapshot(` + itWhenV4( + `Transforms queries defined in own variable in `, + () => { + matchesSnapshot(` import * as React from 'react' import { graphql, StaticQuery } from 'gatsby' @@ -249,9 +253,10 @@ describe(`babel-plugin-remove-graphql-queries`, () => { /> ) `) - }) + } + ) - it(`transforms exported variable queries in `, () => { + itWhenV4(`transforms exported variable queries in `, () => { matchesSnapshot(` import * as React from 'react' import { graphql, StaticQuery } from 'gatsby' @@ -430,7 +435,7 @@ describe(`babel-plugin-remove-graphql-queries`, () => { ) }) - it(`Handles closing StaticQuery tag`, () => { + itWhenV4(`Handles closing StaticQuery tag`, () => { matchesSnapshot(` import * as React from 'react' import { graphql, StaticQuery } from 'gatsby' @@ -445,7 +450,7 @@ describe(`babel-plugin-remove-graphql-queries`, () => { `) }) - it(`Doesn't add data import for non static queries`, () => { + itWhenV4(`Doesn't add data import for non static queries`, () => { matchesSnapshot(` import * as React from 'react' import { StaticQuery, graphql } from "gatsby" diff --git a/packages/babel-preset-gatsby-package/lib/__tests__/__snapshots__/index.js.snap b/packages/babel-preset-gatsby-package/lib/__tests__/__snapshots__/index.js.snap index c9fe2e0dcee30..94886aa70e5a8 100644 --- a/packages/babel-preset-gatsby-package/lib/__tests__/__snapshots__/index.js.snap +++ b/packages/babel-preset-gatsby-package/lib/__tests__/__snapshots__/index.js.snap @@ -77,50 +77,6 @@ Array [ ] `; -exports[`babel-preset-gatsby-package in browser mode specifies the proper plugins 1`] = ` -Array [ - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-transform-runtime", - "@babel/plugin-syntax-dynamic-import", - "babel-plugin-dynamic-import-node", - Array [ - "./babel-transform-compiler-flags", - Object { - "availableFlags": Array [ - "GATSBY_MAJOR", - ], - "flags": Object { - "GATSBY_MAJOR": "4", - }, - }, - ], - "babel-plugin-lodash", -] -`; - -exports[`babel-preset-gatsby-package in node mode can enable compilerFlags 1`] = ` -Array [ - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-transform-runtime", - "@babel/plugin-syntax-dynamic-import", - "babel-plugin-dynamic-import-node", - Array [ - "./babel-transform-compiler-flags", - Object { - "availableFlags": Array [ - "MAJOR", - ], - "flags": Object { - "GATSBY_MAJOR": "4", - }, - }, - ], - "babel-plugin-lodash", -] -`; - exports[`babel-preset-gatsby-package in node mode specifies proper presets 1`] = ` Array [ Array [ @@ -168,25 +124,3 @@ Array [ "@babel/preset-flow", ] `; - -exports[`babel-preset-gatsby-package in node mode specifies the proper plugins 1`] = ` -Array [ - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-transform-runtime", - "@babel/plugin-syntax-dynamic-import", - "babel-plugin-dynamic-import-node", - Array [ - "./babel-transform-compiler-flags", - Object { - "availableFlags": Array [ - "GATSBY_MAJOR", - ], - "flags": Object { - "GATSBY_MAJOR": "4", - }, - }, - ], - "babel-plugin-lodash", -] -`; diff --git a/packages/babel-preset-gatsby-package/lib/__tests__/index.js b/packages/babel-preset-gatsby-package/lib/__tests__/index.js index 6b959547c91fc..3ab2c9c4c6edf 100644 --- a/packages/babel-preset-gatsby-package/lib/__tests__/index.js +++ b/packages/babel-preset-gatsby-package/lib/__tests__/index.js @@ -2,13 +2,15 @@ const preset = require(`../index.js`) jest.mock(`../resolver`, () => jest.fn(moduleName => moduleName)) +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip +const itWhenV5 = _CFLAGS_.GATSBY_MAJOR === `5` ? it : it.skip describe(`babel-preset-gatsby-package`, () => { - let babelEnv; + let babelEnv beforeEach(() => { babelEnv = process.env.BABEL_ENV - delete process.env.BABEL_ENV; + delete process.env.BABEL_ENV }) afterEach(() => { @@ -16,9 +18,54 @@ describe(`babel-preset-gatsby-package`, () => { }) describe(`in node mode`, () => { - it(`specifies the proper plugins`, () => { + itWhenV4(`specifies the proper plugins (v4)`, () => { const { plugins } = preset() - expect(plugins).toMatchSnapshot() + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "GATSBY_MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "4", + }, + }, + ], + "babel-plugin-lodash", + ] + `) + }) + + itWhenV5(`specifies the proper plugins (v5)`, () => { + const { plugins } = preset() + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "GATSBY_MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "5", + }, + }, + ], + "babel-plugin-lodash", + ] + `) }) it(`specifies proper presets`, () => { @@ -37,21 +84,113 @@ describe(`babel-preset-gatsby-package`, () => { nodeVersion, }) - const [, opts] = presets.find(preset => [].concat(preset).includes(`@babel/preset-env`)) + const [, opts] = presets.find(preset => + [].concat(preset).includes(`@babel/preset-env`) + ) expect(opts.targets.node).toBe(nodeVersion) }) - it(`can enable compilerFlags`, () => { + itWhenV4(`can enable compilerFlags (v4)`, () => { const { plugins } = preset(null, { availableCompilerFlags: [`MAJOR`] }) - expect(plugins).toMatchSnapshot() + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "4", + }, + }, + ], + "babel-plugin-lodash", + ] + `) + }) + + itWhenV5(`can enable compilerFlags (v5)`, () => { + const { plugins } = preset(null, { availableCompilerFlags: [`MAJOR`] }) + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "5", + }, + }, + ], + "babel-plugin-lodash", + ] + `) }) }) describe(`in browser mode`, () => { - it(`specifies the proper plugins`, () => { + itWhenV4(`specifies the proper plugins (v4)`, () => { + const { plugins } = preset(null, { browser: true }) + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "GATSBY_MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "4", + }, + }, + ], + "babel-plugin-lodash", + ] + `) + }) + + itWhenV5(`specifies the proper plugins (v5)`, () => { const { plugins } = preset(null, { browser: true }) - expect(plugins).toMatchSnapshot() + expect(plugins).toMatchInlineSnapshot(` + Array [ + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-syntax-dynamic-import", + "babel-plugin-dynamic-import-node", + Array [ + "./babel-transform-compiler-flags", + Object { + "availableFlags": Array [ + "GATSBY_MAJOR", + ], + "flags": Object { + "GATSBY_MAJOR": "5", + }, + }, + ], + "babel-plugin-lodash", + ] + `) }) it(`specifies proper presets`, () => { diff --git a/packages/gatsby-cli/src/__tests__/index.ts b/packages/gatsby-cli/src/__tests__/index.ts index adf7637d75b88..b5e0b9b48fb6b 100644 --- a/packages/gatsby-cli/src/__tests__/index.ts +++ b/packages/gatsby-cli/src/__tests__/index.ts @@ -32,6 +32,9 @@ const getCLI = (): IGetCLI => { } } +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip +const itWhenV5 = _CFLAGS_.GATSBY_MAJOR === `5` ? it : it.skip + let __process__ beforeAll(() => { __process__ = global.process @@ -52,8 +55,7 @@ const setup = (version?: string): ReturnType => { } describe(`error handling`, () => { - // TODO(v5): Update test to handle Node 18 - it(`panics on Node < 14.15.0`, () => { + itWhenV4(`panics on Node < 14.15.0 (v4)`, () => { ;[`6.0.0`, `8.0.0`, `12.13.0`, `13.0.0`].forEach(version => { const { reporter } = setup(version) @@ -62,6 +64,17 @@ describe(`error handling`, () => { }) }) + itWhenV5(`panics on Node < 18.0.0 (v5)`, () => { + ;[`6.0.0`, `8.0.0`, `12.13.0`, `13.0.0`, `14.15.0`, `17.0.0`].forEach( + version => { + const { reporter } = setup(version) + + expect(reporter.panic).toHaveBeenCalledTimes(1) + reporter.panic.mockClear() + } + ) + }) + it(`shows error with link to more info`, () => { const { reporter } = setup(`v6.0.0`) @@ -71,7 +84,7 @@ describe(`error handling`, () => { }) it(`allows prerelease versions`, () => { - const { reporter } = setup(`v15.0.0-pre`) + const { reporter } = setup(`v19.0.0-pre`) expect(reporter.panic).not.toHaveBeenCalled() }) @@ -96,7 +109,7 @@ describe(`error handling`, () => { // }) describe(`normal behavior`, () => { - it(`does not panic on Node >= 14.15.0`, () => { + itWhenV4(`does not panic on Node >= 14.15.0 (v4)`, () => { ;[`14.15.0`, `15.0.0`, `16.3.0`].forEach(version => { const { reporter } = setup(version) @@ -104,6 +117,14 @@ describe(`normal behavior`, () => { }) }) + itWhenV5(`does not panic on Node >= 18.0.0 (v5)`, () => { + ;[`18.0.0`, `19.0.0`, `20.0.0`].forEach(version => { + const { reporter } = setup(version) + + expect(reporter.panic).not.toHaveBeenCalled() + }) + }) + it(`invokes createCli`, () => { const { createCli } = setup() diff --git a/packages/gatsby/src/query/__tests__/__snapshots__/file-parser.js.snap b/packages/gatsby/src/query/__tests__/__snapshots__/file-parser.js.snap index 844d791215ddb..7b55ef955af1f 100644 --- a/packages/gatsby/src/query/__tests__/__snapshots__/file-parser.js.snap +++ b/packages/gatsby/src/query/__tests__/__snapshots__/file-parser.js.snap @@ -1,2560 +1,2556 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`File parser extracts query AST correctly from files: panicOnBuild 1`] = ` -Array [ - Array [ - "Using the global \`graphql\` tag for Gatsby's queries isn't supported as of v3. +exports[`File parser extracts query AST correctly from files 1`] = ` +Object { + "panicOnBuildCalls": Array [ + Array [ + "Using the global \`graphql\` tag for Gatsby's queries isn't supported as of v3. Import it instead like: import { graphql } from 'gatsby' in file: global-query.js", - ], - Array [ - "Using the global \`graphql\` tag for Gatsby's queries isn't supported as of v3. + ], + Array [ + "Using the global \`graphql\` tag for Gatsby's queries isn't supported as of v3. Import it instead like: import { graphql } from 'gatsby' in file: global-static-query-hooks.js", + ], ], -] -`; - -exports[`File parser extracts query AST correctly from files: results 1`] = ` -Array [ - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 30, - "start": 1, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 20, - "start": 7, - }, - "value": "PageQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + "results": Array [ + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 30, - "start": 21, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 28, - "start": 25, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 20, + "start": 7, + }, + "value": "PageQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 30, + "start": 21, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 28, "start": 25, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 28, + "start": 25, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 31, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 31, - "start": 0, }, - }, - "filePath": "page-query.js", - "hash": 3530286846, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 97, - "line": 6, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 33, - "index": 66, - "line": 2, + "filePath": "page-query.js", + "hash": 3530286846, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 97, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 33, + "index": 66, + "line": 2, + }, }, + "text": "query PageQueryName{foo}", }, - "text": "query PageQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 34, - "start": 1, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 24, - "start": 7, - }, - "value": "PageQueryIndirect", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 34, - "start": 25, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 32, - "start": 29, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 24, + "start": 7, + }, + "value": "PageQueryIndirect", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 34, + "start": 25, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 32, "start": 29, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 32, + "start": 29, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 35, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 35, - "start": 0, }, - }, - "filePath": "page-query-indirect.js", - "hash": 1314068098, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 94, - "line": 6, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 26, - "index": 59, - "line": 2, + "filePath": "page-query-indirect.js", + "hash": 1314068098, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 94, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 26, + "index": 59, + "line": 2, + }, }, + "text": "query PageQueryIndirect{foo}", }, - "text": "query PageQueryIndirect{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 35, - "start": 1, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 25, - "start": 7, - }, - "value": "PageQueryIndirect2", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 35, - "start": 26, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 33, - "start": 30, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 25, + "start": 7, + }, + "value": "PageQueryIndirect2", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 35, + "start": 26, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 33, "start": 30, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 33, + "start": 30, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 36, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 36, - "start": 0, }, - }, - "filePath": "page-query-indirect-2.js", - "hash": 1258001265, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 95, - "line": 6, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 26, - "index": 59, - "line": 2, + "filePath": "page-query-indirect-2.js", + "hash": 1258001265, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 95, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 26, + "index": 59, + "line": 2, + }, }, + "text": "query PageQueryIndirect2{foo}", }, - "text": "query PageQueryIndirect2{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 16, - "start": 1, - }, - "name": Object { - "kind": "Name", - "value": "pagePageQueryNoNameJs1125018085", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 16, - "start": 7, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 14, - "start": 11, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "value": "pagePageQueryNoNameJs1125018085", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 16, + "start": 7, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 14, "start": 11, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 14, + "start": 11, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 17, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 17, - "start": 0, - }, - }, - "filePath": "page-query-no-name.js", - "hash": 1125018085, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 81, - "line": 6, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 31, - "index": 64, - "line": 2, + "filePath": "page-query-no-name.js", + "hash": 1125018085, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 81, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 31, + "index": 64, + "line": 2, + }, }, + "text": "query{foo}", }, - "text": "query{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, - }, - }, - "filePath": "static-query.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 48, - "index": 121, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 92, - "line": 4, + "filePath": "static-query.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 48, + "index": 121, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 92, + "line": 4, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 7, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticStaticQueryNoNameJs3221935794", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 7, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 5, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "staticStaticQueryNoNameJs3221935794", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 7, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 5, "start": 2, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5, + "start": 2, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 7, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 7, - "start": 0, - }, - }, - "filePath": "static-query-no-name.js", - "hash": 3221935794, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 26, - "index": 99, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 92, - "line": 4, + "filePath": "static-query-no-name.js", + "hash": 3221935794, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 26, + "index": 99, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 92, + "line": 4, + }, }, + "text": "{foo}", }, - "text": "{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, - }, - }, - "filePath": "static-query-named-export.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 48, - "index": 131, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 102, - "line": 4, + "filePath": "static-query-named-export.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 48, + "index": 131, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 102, + "line": 4, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 7, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticStaticQueryClosingTagJs3221935794", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 7, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 5, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "staticStaticQueryClosingTagJs3221935794", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 7, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 5, "start": 2, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 5, + "start": 2, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 7, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 7, - "start": 0, }, - }, - "filePath": "static-query-closing-tag.js", - "hash": 3221935794, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 26, - "index": 99, - "line": 4, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 92, - "line": 4, + "filePath": "static-query-closing-tag.js", + "hash": 3221935794, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 26, + "index": 99, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 92, + "line": 4, + }, }, + "text": "{foo}", }, - "text": "{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, }, - }, - "filePath": "page-query-and-static-query-named-export.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 48, - "index": 131, - "line": 4, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 102, - "line": 4, + "filePath": "page-query-and-static-query-named-export.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 48, + "index": 131, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 102, + "line": 4, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 27, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 19, - "start": 6, - }, - "value": "PageQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 27, - "start": 20, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 25, - "start": 22, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 19, + "start": 6, + }, + "value": "PageQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 27, + "start": 20, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 25, "start": 22, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 25, + "start": 22, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 27, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 27, - "start": 0, - }, - }, - "filePath": "page-query-and-static-query-named-export.js", - "hash": 3530286846, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 60, - "index": 244, - "line": 8, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 33, - "index": 217, - "line": 8, + "filePath": "page-query-and-static-query-named-export.js", + "hash": 3530286846, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 60, + "index": 244, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 33, + "index": 217, + "line": 8, + }, }, + "text": "query PageQueryName{foo}", }, - "text": "query PageQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "FragmentDefinition", - "loc": Object { - "end": 53, - "start": 3, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 12, - }, - "value": "Fragment1", - }, - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "FragmentDefinition", "loc": Object { "end": 53, - "start": 40, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 49, - "start": 46, - }, - "name": Object { - "kind": "Name", + "start": 3, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 12, + }, + "value": "Fragment1", + }, + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 53, + "start": 40, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 49, "start": 46, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 49, + "start": 46, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], - }, - "typeCondition": Object { - "kind": "NamedType", - "loc": Object { - "end": 39, - "start": 25, + ], }, - "name": Object { - "kind": "Name", + "typeCondition": Object { + "kind": "NamedType", "loc": Object { "end": 39, "start": 25, }, - "value": "RootQueryField", - }, - }, - }, - Object { - "directives": Array [], - "kind": "FragmentDefinition", - "loc": Object { - "end": 106, - "start": 56, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 74, - "start": 65, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 39, + "start": 25, + }, + "value": "RootQueryField", + }, }, - "value": "Fragment2", }, - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "directives": Array [], + "kind": "FragmentDefinition", "loc": Object { "end": 106, - "start": 93, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 102, - "start": 99, - }, - "name": Object { - "kind": "Name", + "start": 56, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 74, + "start": 65, + }, + "value": "Fragment2", + }, + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 106, + "start": 93, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 102, "start": 99, }, - "value": "bar", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 102, + "start": 99, + }, + "value": "bar", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], - }, - "typeCondition": Object { - "kind": "NamedType", - "loc": Object { - "end": 92, - "start": 78, + ], }, - "name": Object { - "kind": "Name", + "typeCondition": Object { + "kind": "NamedType", "loc": Object { "end": 92, "start": 78, }, - "value": "RootQueryField", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 92, + "start": 78, + }, + "value": "RootQueryField", + }, }, }, + ], + "kind": "Document", + "loc": Object { + "end": 107, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 107, - "start": 0, }, - }, - "filePath": "multiple-fragment-exports.js", - "hash": 1171727280, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 175, - "line": 9, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 35, - "index": 68, - "line": 2, + "filePath": "multiple-fragment-exports.js", + "hash": 1171727280, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 175, + "line": 9, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 35, + "index": 68, + "line": 2, + }, }, + "text": "fragment Fragment1 on RootQueryField{foo}fragment Fragment2 on RootQueryField{bar}", }, - "text": "fragment Fragment1 on RootQueryField{foo}fragment Fragment2 on RootQueryField{bar}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "FragmentDefinition", - "loc": Object { - "end": 53, - "start": 3, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 12, - }, - "value": "Fragment3", - }, - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "FragmentDefinition", "loc": Object { "end": 53, - "start": 40, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 49, - "start": 46, - }, - "name": Object { - "kind": "Name", + "start": 3, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 12, + }, + "value": "Fragment3", + }, + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 53, + "start": 40, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 49, "start": 46, }, - "value": "baz", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 49, + "start": 46, + }, + "value": "baz", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], - }, - "typeCondition": Object { - "kind": "NamedType", - "loc": Object { - "end": 39, - "start": 25, + ], }, - "name": Object { - "kind": "Name", + "typeCondition": Object { + "kind": "NamedType", "loc": Object { "end": 39, "start": 25, }, - "value": "RootQueryField", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 39, + "start": 25, + }, + "value": "RootQueryField", + }, }, }, + ], + "kind": "Document", + "loc": Object { + "end": 54, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 54, - "start": 0, - }, - }, - "filePath": "multiple-fragment-exports.js", - "hash": 3923246124, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 264, - "line": 14, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 33, - "index": 210, - "line": 10, + "filePath": "multiple-fragment-exports.js", + "hash": 3923246124, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 264, + "line": 14, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 33, + "index": 210, + "line": 10, + }, }, + "text": "fragment Fragment3 on RootQueryField{baz}", }, - "text": "fragment Fragment3 on RootQueryField{baz}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 74, - "start": 3, - }, - "name": Object { - "kind": "Name", - "value": "staticFragmentShorthandJs3159585216", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 74, - "start": 9, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 70, - "start": 15, - }, - "name": Object { - "kind": "Name", + "start": 3, + }, + "name": Object { + "kind": "Name", + "value": "staticFragmentShorthandJs3159585216", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 74, + "start": 9, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 19, + "end": 70, "start": 15, }, - "value": "site", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 70, - "start": 20, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 19, + "start": 15, + }, + "value": "site", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 64, - "start": 28, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 70, + "start": 20, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 40, + "end": 64, "start": 28, }, - "value": "siteMetadata", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 64, - "start": 41, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 40, + "start": 28, + }, + "value": "siteMetadata", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 56, - "start": 51, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 64, + "start": 41, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 56, "start": 51, }, - "value": "title", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 56, + "start": 51, + }, + "value": "title", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 75, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 75, - "start": 0, - }, - }, - "filePath": "fragment-shorthand.js", - "hash": 3159585216, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 170, - "line": 12, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 22, - "index": 95, - "line": 4, + "filePath": "fragment-shorthand.js", + "hash": 3159585216, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 170, + "line": 12, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 22, + "index": 95, + "line": 4, + }, }, + "text": "query{site{siteMetadata{title}}}", }, - "text": "query{site{siteMetadata{title}}}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 47, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticQueryInSeparateVariableJs1528532020", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 47, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 46, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "staticQueryInSeparateVariableJs1528532020", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 47, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 19, + "end": 46, "start": 2, }, - "value": "allMarkdownRemark", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 46, - "start": 20, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 19, + "start": 2, + }, + "value": "allMarkdownRemark", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 45, - "start": 22, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 46, + "start": 20, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 26, + "end": 45, "start": 22, }, - "value": "blah", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 45, - "start": 27, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 26, + "start": 22, + }, + "value": "blah", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 44, - "start": 29, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 45, + "start": 27, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 33, + "end": 44, "start": 29, }, - "value": "node", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 44, - "start": 34, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 33, + "start": 29, + }, + "value": "node", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 42, - "start": 36, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 44, + "start": 34, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 42, "start": 36, }, - "value": "cheese", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 42, + "start": 36, + }, + "value": "cheese", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 47, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 47, - "start": 0, - }, - }, - "filePath": "query-in-separate-variable.js", - "hash": 1528532020, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 69, - "index": 142, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 22, - "index": 95, - "line": 4, + "filePath": "query-in-separate-variable.js", + "hash": 1528532020, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 69, + "index": 142, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 22, + "index": 95, + "line": 4, + }, }, + "text": "{allMarkdownRemark{blah{node{cheese}}}}", }, - "text": "{allMarkdownRemark{blah{node{cheese}}}}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 49, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticQueryInSeparateVariable2Js278713111", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 49, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 48, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "staticQueryInSeparateVariable2Js278713111", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 49, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 21, + "end": 48, "start": 2, }, - "value": "allStrangeQueryName", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 48, - "start": 22, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 2, + }, + "value": "allStrangeQueryName", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 47, - "start": 24, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 48, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 28, + "end": 47, "start": 24, }, - "value": "blah", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 47, - "start": 29, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 28, + "start": 24, + }, + "value": "blah", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 46, - "start": 31, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 47, + "start": 29, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 35, + "end": 46, "start": 31, }, - "value": "node", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 46, - "start": 36, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 35, + "start": 31, + }, + "value": "node", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 44, - "start": 38, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 46, + "start": 36, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 44, "start": 38, }, - "value": "cheese", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 44, + "start": 38, + }, + "value": "cheese", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 49, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 49, - "start": 0, }, - }, - "filePath": "query-in-separate-variable-2.js", - "hash": 278713111, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 82, - "index": 216, - "line": 5, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 33, - "index": 167, - "line": 5, + "filePath": "query-in-separate-variable-2.js", + "hash": 278713111, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 82, + "index": 216, + "line": 5, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 33, + "index": 167, + "line": 5, + }, }, + "text": "{allStrangeQueryName{blah{node{cheese}}}}", }, - "text": "{allStrangeQueryName{blah{node{cheese}}}}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, }, - }, - "filePath": "static-query-hooks.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 67, - "index": 139, - "line": 3, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 38, - "index": 110, - "line": 3, + "filePath": "static-query-hooks.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 67, + "index": 139, + "line": 3, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 38, + "index": 110, + "line": 3, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, - }, - }, - "filePath": "static-query-hooks-with-other-export.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 67, - "index": 165, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 38, - "index": 136, - "line": 4, + "filePath": "static-query-hooks-with-other-export.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 67, + "index": 165, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 38, + "index": 136, + "line": 4, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, - }, - }, - "filePath": "static-query-hooks-alternative-import.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 81, - "index": 137, - "line": 3, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 52, - "index": 108, - "line": 3, + "filePath": "static-query-hooks-alternative-import.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 81, + "index": 137, + "line": 3, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 52, + "index": 108, + "line": 3, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, }, - }, - "filePath": "static-query-hooks-with-type-parameter.ts", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 82, - "index": 154, - "line": 3, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 53, - "index": 125, - "line": 3, + "filePath": "static-query-hooks-with-type-parameter.ts", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 82, + "index": 154, + "line": 3, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 53, + "index": 125, + "line": 3, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 47, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticStaticQueryHooksInSeparateVariableJs1528532020", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 47, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 46, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "staticStaticQueryHooksInSeparateVariableJs1528532020", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 47, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 19, + "end": 46, "start": 2, }, - "value": "allMarkdownRemark", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 46, - "start": 20, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 19, + "start": 2, + }, + "value": "allMarkdownRemark", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 45, - "start": 22, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 46, + "start": 20, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 26, + "end": 45, "start": 22, }, - "value": "blah", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 45, - "start": 27, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 26, + "start": 22, + }, + "value": "blah", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 44, - "start": 29, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 45, + "start": 27, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { - "end": 33, + "end": 44, "start": 29, }, - "value": "node", - }, - "selectionSet": Object { - "kind": "SelectionSet", - "loc": Object { - "end": 44, - "start": 34, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 33, + "start": 29, + }, + "value": "node", }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 42, - "start": 36, - }, - "name": Object { - "kind": "Name", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 44, + "start": 34, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 42, "start": 36, }, - "value": "cheese", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 42, + "start": 36, + }, + "value": "cheese", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, }, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 47, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 47, - "start": 0, }, - }, - "filePath": "static-query-hooks-in-separate-variable.js", - "hash": 1528532020, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 69, - "index": 145, - "line": 4, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 22, - "index": 98, - "line": 4, + "filePath": "static-query-hooks-in-separate-variable.js", + "hash": 1528532020, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 69, + "index": 145, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 22, + "index": 98, + "line": 4, + }, }, + "text": "{allMarkdownRemark{blah{node{cheese}}}}", }, - "text": "{allMarkdownRemark{blah{node{cheese}}}}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 13, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticZhADollarpercentandJs1125018085", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 13, - "start": 6, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 11, - "start": 8, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "value": "staticZhADollarpercentandJs1125018085", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 13, + "start": 6, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 11, "start": 8, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 11, + "start": 8, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 13, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 13, - "start": 0, - }, - }, - "filePath": "ж-ä-!@#$%^&*()_-=+:;'\\"?,~\`.js", - "hash": 1125018085, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 51, - "index": 123, - "line": 3, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 38, - "index": 110, - "line": 3, + "filePath": "ж-ä-!@#$%^&*()_-=+:;'\\"?,~\`.js", + "hash": 1125018085, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 51, + "index": 123, + "line": 3, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 38, + "index": 110, + "line": 3, + }, }, + "text": "query{foo}", }, - "text": "query{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 13, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "staticStaticZhADollarpercentandJs1125018085", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 13, - "start": 6, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 11, - "start": 8, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "value": "staticStaticZhADollarpercentandJs1125018085", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 13, + "start": 6, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 11, "start": 8, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 11, + "start": 8, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 13, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 13, - "start": 0, - }, - }, - "filePath": "static-ж-ä-!@#$%^&*()_-=+:;'\\"?,~\`.js", - "hash": 1125018085, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 32, - "index": 105, - "line": 4, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 19, - "index": 92, - "line": 4, + "filePath": "static-ж-ä-!@#$%^&*()_-=+:;'\\"?,~\`.js", + "hash": 1125018085, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 32, + "index": 105, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 19, + "index": 92, + "line": 4, + }, }, + "text": "query{foo}", }, - "text": "query{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 29, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 21, - "start": 6, - }, - "value": "StaticQueryName", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 29, - "start": 22, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 27, - "start": 24, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 21, + "start": 6, + }, + "value": "StaticQueryName", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 29, + "start": 22, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 27, "start": 24, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 27, + "start": 24, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 29, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 29, - "start": 0, - }, - }, - "filePath": "static-query-hooks-commonjs.js", - "hash": 2687344169, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 67, - "index": 146, - "line": 3, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 38, - "index": 117, - "line": 3, + "filePath": "static-query-hooks-commonjs.js", + "hash": 2687344169, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 67, + "index": 146, + "line": 3, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 38, + "index": 117, + "line": 3, + }, }, + "text": "query StaticQueryName{foo}", }, - "text": "query StaticQueryName{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 44, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 36, - "start": 6, - }, - "value": "StaticQueryNameNoDestructuring", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 44, - "start": 37, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 42, - "start": 39, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 36, + "start": 6, + }, + "value": "StaticQueryNameNoDestructuring", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 44, + "start": 37, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 42, "start": 39, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 42, + "start": 39, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 44, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 44, - "start": 0, }, - }, - "filePath": "static-query-hooks-commonjs-no-destructuring.js", - "hash": 2462364336, - "isConfigQuery": false, - "isHook": true, - "isStaticQuery": true, - "templateLoc": SourceLocation { - "end": Position { - "column": 89, - "index": 183, - "line": 4, - }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 45, - "index": 139, - "line": 4, + "filePath": "static-query-hooks-commonjs-no-destructuring.js", + "hash": 2462364336, + "isConfigQuery": false, + "isHook": true, + "isStaticQuery": true, + "templateLoc": SourceLocation { + "end": Position { + "column": 89, + "index": 183, + "line": 4, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 45, + "index": 139, + "line": 4, + }, }, + "text": "query StaticQueryNameNoDestructuring{foo}", }, - "text": "query StaticQueryNameNoDestructuring{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 26, - "start": 1, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 16, - "start": 7, - }, - "value": "PageQuery", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 26, - "start": 17, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 24, - "start": 21, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 16, + "start": 7, + }, + "value": "PageQuery", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 26, + "start": 17, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 24, "start": 21, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 24, + "start": 21, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 27, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 27, - "start": 0, - }, - }, - "filePath": "page-with-config.js", - "hash": 3463071779, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 89, - "line": 6, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 29, - "index": 62, - "line": 2, + "filePath": "page-with-config.js", + "hash": 3463071779, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 89, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 29, + "index": 62, + "line": 2, + }, }, + "text": "query PageQuery{foo}", }, - "text": "query PageQuery{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 32, - "start": 0, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 17, - "start": 6, - }, - "value": "ConfigQuery", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 32, - "start": 18, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 30, - "start": 20, - }, - "name": Object { - "kind": "Name", + "start": 0, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 17, + "start": 6, + }, + "value": "ConfigQuery", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 32, + "start": 18, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 30, "start": 20, }, - "value": "__typename", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 30, + "start": 20, + }, + "value": "__typename", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 32, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 32, - "start": 0, - }, - }, - "filePath": "page-with-config.js", - "hash": 3646331219, - "isConfigQuery": true, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 56, - "index": 180, - "line": 8, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 24, - "index": 148, - "line": 8, + "filePath": "page-with-config.js", + "hash": 3646331219, + "isConfigQuery": true, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 56, + "index": 180, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 24, + "index": 148, + "line": 8, + }, }, + "text": "query ConfigQuery{__typename}", }, - "text": "query ConfigQuery{__typename}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 26, - "start": 1, - }, - "name": Object { - "kind": "Name", - "loc": Object { - "end": 16, - "start": 7, - }, - "value": "PageQuery", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 26, - "start": 17, - }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 24, - "start": 21, - }, - "name": Object { - "kind": "Name", + "start": 1, + }, + "name": Object { + "kind": "Name", + "loc": Object { + "end": 16, + "start": 7, + }, + "value": "PageQuery", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 26, + "start": 17, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 24, "start": 21, }, - "value": "foo", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 24, + "start": 21, + }, + "value": "foo", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 27, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 27, - "start": 0, - }, - }, - "filePath": "page-with-config-no-name.js", - "hash": 3463071779, - "isConfigQuery": false, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 0, - "index": 89, - "line": 6, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 29, - "index": 62, - "line": 2, + "filePath": "page-with-config-no-name.js", + "hash": 3463071779, + "isConfigQuery": false, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 0, + "index": 89, + "line": 6, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 29, + "index": 62, + "line": 2, + }, }, + "text": "query PageQuery{foo}", }, - "text": "query PageQuery{foo}", - }, - Object { - "doc": Object { - "definitions": Array [ - Object { - "directives": Array [], - "kind": "OperationDefinition", - "loc": Object { - "end": 14, - "start": 0, - }, - "name": Object { - "kind": "Name", - "value": "configPageWithConfigNoNameJs4128538483", - }, - "operation": "query", - "selectionSet": Object { - "kind": "SelectionSet", + Object { + "doc": Object { + "definitions": Array [ + Object { + "directives": Array [], + "kind": "OperationDefinition", "loc": Object { "end": 14, "start": 0, }, - "selections": Array [ - Object { - "alias": undefined, - "arguments": Array [], - "directives": Array [], - "kind": "Field", - "loc": Object { - "end": 12, - "start": 2, - }, - "name": Object { - "kind": "Name", + "name": Object { + "kind": "Name", + "value": "configPageWithConfigNoNameJs4128538483", + }, + "operation": "query", + "selectionSet": Object { + "kind": "SelectionSet", + "loc": Object { + "end": 14, + "start": 0, + }, + "selections": Array [ + Object { + "alias": undefined, + "arguments": Array [], + "directives": Array [], + "kind": "Field", "loc": Object { "end": 12, "start": 2, }, - "value": "__typename", + "name": Object { + "kind": "Name", + "loc": Object { + "end": 12, + "start": 2, + }, + "value": "__typename", + }, + "selectionSet": undefined, }, - "selectionSet": undefined, - }, - ], + ], + }, + "variableDefinitions": Array [], }, - "variableDefinitions": Array [], + ], + "kind": "Document", + "loc": Object { + "end": 14, + "start": 0, }, - ], - "kind": "Document", - "loc": Object { - "end": 14, - "start": 0, - }, - }, - "filePath": "page-with-config-no-name.js", - "hash": 4128538483, - "isConfigQuery": true, - "isHook": false, - "isStaticQuery": false, - "templateLoc": SourceLocation { - "end": Position { - "column": 38, - "index": 165, - "line": 8, }, - "filename": undefined, - "identifierName": undefined, - "start": Position { - "column": 24, - "index": 151, - "line": 8, + "filePath": "page-with-config-no-name.js", + "hash": 4128538483, + "isConfigQuery": true, + "isHook": false, + "isStaticQuery": false, + "templateLoc": SourceLocation { + "end": Position { + "column": 38, + "index": 165, + "line": 8, + }, + "filename": undefined, + "identifierName": undefined, + "start": Position { + "column": 24, + "index": 151, + "line": 8, + }, }, + "text": "{__typename}", }, - "text": "{__typename}", - }, -] -`; - -exports[`File parser extracts query AST correctly from files: warn 1`] = ` -Array [ - Array [ - " + ], + "warnCalls": Array [ + Array [ + " We were unable to find the declaration of variable \\"strangeQueryName\\", which you passed as the \\"query\\" prop into the declaration in \\"query-not-defined.js\\". Perhaps the variable name has a typo? Also note that we are currently unable to use queries defined in files other than the file where the is defined. If you're attempting to import the query, please move it into \\"query-not-defined.js\\". If being able to import queries from another file is an important capability for you, we invite your help fixing it. ", - ], - Array [ - " + ], + Array [ + " We were unable to find the declaration of variable \\"strangeQueryName\\", which you passed as the \\"query\\" prop into the declaration in \\"query-imported.js\\". Perhaps the variable name has a typo? Also note that we are currently unable to use queries defined in files other than the file where the is defined. If you're attempting to import the query, please move it into \\"query-imported.js\\". If being able to import queries from another file is an important capability for you, we invite your help fixing it. ", - ], - Array [ - " + ], + Array [ + " We were unable to find the declaration of variable \\"strangeQueryName\\", which you passed as the \\"query\\" prop into the useStaticQuery declaration in \\"static-query-hooks-not-defined.js\\". Perhaps the variable name has a typo? Also note that we are currently unable to use queries defined in files other than the file where the useStaticQuery is defined. If you're attempting to import the query, please move it into \\"static-query-hooks-not-defined.js\\". If being able to import queries from another file is an important capability for you, we invite your help fixing it. ", - ], - Array [ - " + ], + Array [ + " We were unable to find the declaration of variable \\"strangeQueryName\\", which you passed as the \\"query\\" prop into the useStaticQuery declaration in \\"static-query-hooks-imported.js\\". Perhaps the variable name has a typo? Also note that we are currently unable to use queries defined in files other than the file where the useStaticQuery is defined. If you're attempting to import the query, please move it into \\"static-query-hooks-imported.js\\". If being able to import queries from another file is an important capability for you, we invite your help fixing it. ", + ], ], -] +} `; diff --git a/packages/gatsby/src/query/__tests__/file-parser.js b/packages/gatsby/src/query/__tests__/file-parser.js index 01a9883943a0b..2f1056717167d 100644 --- a/packages/gatsby/src/query/__tests__/file-parser.js +++ b/packages/gatsby/src/query/__tests__/file-parser.js @@ -14,6 +14,8 @@ const FileParser = require(`../file-parser`).default const specialChars = `ж-ä-!@#$%^&*()_-=+:;'"?,~\`` +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip + describe(`File parser`, () => { const MOCK_FILE_INFO = { "no-query.js": `import React from "react"`, @@ -282,7 +284,8 @@ export const config = async () => { ) }) - it(`extracts query AST correctly from files`, async () => { + // this will need snapshot update once v5 becomes default, this should not be removed + itWhenV4(`extracts query AST correctly from files`, async () => { const errors = [] const addError = errors.push.bind(errors) const results = await parser.parseFiles( @@ -303,10 +306,11 @@ export const config = async () => { ]) ) - // The second param is a "hint", see: https://jestjs.io/docs/en/expect#tomatchsnapshotpropertymatchers-hint - expect(results).toMatchSnapshot({}, `results`) - expect(reporter.warn.mock.calls).toMatchSnapshot({}, `warn`) - expect(reporter.panicOnBuild.mock.calls).toMatchSnapshot({}, `panicOnBuild`) + expect({ + results, + warnCalls: reporter.warn.mock.calls, + panicOnBuildCalls: reporter.panicOnBuild.mock.calls, + }).toMatchSnapshot() expect(errors.length).toEqual(1) }) @@ -318,11 +322,17 @@ export const config = async () => { value: `staticZhADollarpercentandJs1125018085`, }) - const ast2 = await parser.parseFile(`static-${specialChars}.js`, jest.fn()) - const nameNode2 = ast2[0].doc.definitions[0].name - expect(nameNode2).toEqual({ - kind: `Name`, - value: `staticStaticZhADollarpercentandJs1125018085`, - }) + if (_CFLAGS_.GATSBY_MAJOR !== `5`) { + // this is testing StaticQuery which is being removed in v5 + const ast2 = await parser.parseFile( + `static-${specialChars}.js`, + jest.fn() + ) + const nameNode2 = ast2[0].doc.definitions[0].name + expect(nameNode2).toEqual({ + kind: `Name`, + value: `staticStaticZhADollarpercentandJs1125018085`, + }) + } }) }) diff --git a/packages/gatsby/src/schema/__tests__/__snapshots__/build-schema.js.snap b/packages/gatsby/src/schema/__tests__/__snapshots__/build-schema.js.snap index ddc3774f5200f..78c09a5c5af40 100644 --- a/packages/gatsby/src/schema/__tests__/__snapshots__/build-schema.js.snap +++ b/packages/gatsby/src/schema/__tests__/__snapshots__/build-schema.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Built-in types includes built-in types 1`] = ` +exports[`Built-in types includes built-in types (v4) 1`] = ` "\\"\\"\\"Add date formatting options.\\"\\"\\" directive @dateformat(formatString: String, locale: String, fromNow: Boolean, difference: String) on FIELD_DEFINITION @@ -1800,3 +1800,1285 @@ input SiteBuildMetadataSortInput { } " `; + +exports[`Built-in types includes built-in types (v5) 1`] = ` +"\\"\\"\\"Add date formatting options.\\"\\"\\" +directive @dateformat(formatString: String, locale: String, fromNow: Boolean, difference: String) on FIELD_DEFINITION + +\\"\\"\\"Link to node by foreign-key relation.\\"\\"\\" +directive @link(by: String! = \\"id\\", from: String, on: String) on FIELD_DEFINITION + +\\"\\"\\"Link to File node by relative path.\\"\\"\\" +directive @fileByRelativePath(from: String) on FIELD_DEFINITION + +\\"\\"\\"Proxy resolver from another field.\\"\\"\\" +directive @proxy(from: String!, fromNode: Boolean! = false) on FIELD_DEFINITION + +\\"\\"\\"Infer field types from field values.\\"\\"\\" +directive @infer on OBJECT + +\\"\\"\\"Do not infer field types from field values.\\"\\"\\" +directive @dontInfer on OBJECT + +\\"\\"\\"Define the mime-types handled by this type.\\"\\"\\" +directive @mimeTypes( + \\"\\"\\"The mime-types handled by this type.\\"\\"\\" + types: [String!]! = [] +) on OBJECT + +\\"\\"\\" +Define parent-child relations between types. This is used to add \`child*\` and \`children*\` convenience fields like \`childImageSharp\`. +\\"\\"\\" +directive @childOf( + \\"\\"\\" + A list of mime-types this type is a child of. Usually these are the mime-types handled by a transformer plugin. + \\"\\"\\" + mimeTypes: [String!]! = [] + + \\"\\"\\" + A list of types this type is a child of. Usually these are the types handled by a transformer plugin. + \\"\\"\\" + types: [String!]! = [] +) on OBJECT + +\\"\\"\\" +DEPRECATED: Use interface inheritance instead, i.e. \\"interface Foo implements Node\\". + +Adds root query fields for an interface. All implementing types must also implement the Node interface. +\\"\\"\\" +directive @nodeInterface on INTERFACE + +type File implements Node { + sourceInstanceName: String! + absolutePath: String! + relativePath: String! + extension: String! + size: Int! + prettySize: String! + modifiedTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + accessTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + changeTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + birthTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + root: String! + dir: String! + base: String! + ext: String! + name: String! + relativeDirectory: String! + dev: Int! + mode: Int! + nlink: Int! + uid: Int! + gid: Int! + rdev: Int! + ino: Float! + atimeMs: Float! + mtimeMs: Float! + ctimeMs: Float! + atime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + mtime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + ctime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + birthtime: Date @deprecated(reason: \\"Use \`birthTime\` instead\\") + birthtimeMs: Float @deprecated(reason: \\"Use \`birthTime\` instead\\") + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +\\"\\"\\"Node Interface\\"\\"\\" +interface Node { + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type Internal { + content: String + contentDigest: String! + description: String + fieldOwners: [String] + ignoreType: Boolean + mediaType: String + owner: String! + type: String! + contentFilePath: String +} + +\\"\\"\\" +A date string, such as 2007-12-03, compliant with the ISO 8601 standard for representation of dates and times using the Gregorian calendar. +\\"\\"\\" +scalar Date + +type Directory implements Node { + sourceInstanceName: String! + absolutePath: String! + relativePath: String! + extension: String! + size: Int! + prettySize: String! + modifiedTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + accessTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + changeTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + birthTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + root: String! + dir: String! + base: String! + ext: String! + name: String! + relativeDirectory: String! + dev: Int! + mode: Int! + nlink: Int! + uid: Int! + gid: Int! + rdev: Int! + ino: Float! + atimeMs: Float! + mtimeMs: Float! + ctimeMs: Float! + atime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + mtime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + ctime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date! + birthtime: Date @deprecated(reason: \\"Use \`birthTime\` instead\\") + birthtimeMs: Float @deprecated(reason: \\"Use \`birthTime\` instead\\") + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type Site implements Node { + buildTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date + siteMetadata: SiteSiteMetadata + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type SiteSiteMetadata { + title: String + description: String +} + +type SiteFunction implements Node { + functionRoute: String! + pluginName: String! + originalAbsoluteFilePath: String! + originalRelativeFilePath: String! + relativeCompiledFilePath: String! + absoluteCompiledFilePath: String! + matchPath: String + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type SitePage implements Node { + path: String! + component: String! + internalComponentName: String! + componentChunkName: String! + matchPath: String + pageContext: JSON + pluginCreator: SitePlugin + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +\\"\\"\\" +The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +\\"\\"\\" +scalar JSON @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\") + +type SitePlugin implements Node { + resolve: String + name: String + version: String + nodeAPIs: [String] + browserAPIs: [String] + ssrAPIs: [String] + pluginFilepath: String + pluginOptions: JSON + packageJson: JSON + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type SiteBuildMetadata implements Node { + buildTime( + \\"\\"\\" + Format the date using Moment.js' date tokens, e.g. \`date(formatString: \\"YYYY MMMM DD\\")\`. See https://momentjs.com/docs/#/displaying/format/ for documentation for different tokens. + \\"\\"\\" + formatString: String + + \\"\\"\\"Returns a string generated with Moment.js' \`fromNow\` function\\"\\"\\" + fromNow: Boolean + + \\"\\"\\" + Returns the difference between this date and the current time. Defaults to \\"milliseconds\\" but you can also pass in as the measurement \\"years\\", \\"months\\", \\"weeks\\", \\"days\\", \\"hours\\", \\"minutes\\", and \\"seconds\\". + \\"\\"\\" + difference: String + + \\"\\"\\"Configures the locale Moment.js will use to format the date.\\"\\"\\" + locale: String + ): Date + id: ID! + parent: Node + children: [Node!]! + internal: Internal! +} + +type Query { + file(sourceInstanceName: StringQueryOperatorInput, absolutePath: StringQueryOperatorInput, relativePath: StringQueryOperatorInput, extension: StringQueryOperatorInput, size: IntQueryOperatorInput, prettySize: StringQueryOperatorInput, modifiedTime: DateQueryOperatorInput, accessTime: DateQueryOperatorInput, changeTime: DateQueryOperatorInput, birthTime: DateQueryOperatorInput, root: StringQueryOperatorInput, dir: StringQueryOperatorInput, base: StringQueryOperatorInput, ext: StringQueryOperatorInput, name: StringQueryOperatorInput, relativeDirectory: StringQueryOperatorInput, dev: IntQueryOperatorInput, mode: IntQueryOperatorInput, nlink: IntQueryOperatorInput, uid: IntQueryOperatorInput, gid: IntQueryOperatorInput, rdev: IntQueryOperatorInput, ino: FloatQueryOperatorInput, atimeMs: FloatQueryOperatorInput, mtimeMs: FloatQueryOperatorInput, ctimeMs: FloatQueryOperatorInput, atime: DateQueryOperatorInput, mtime: DateQueryOperatorInput, ctime: DateQueryOperatorInput, birthtime: DateQueryOperatorInput, birthtimeMs: FloatQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): File + allFile(filter: FileFilterInput, sort: [FileSortInput], skip: Int, limit: Int): FileConnection! + directory(sourceInstanceName: StringQueryOperatorInput, absolutePath: StringQueryOperatorInput, relativePath: StringQueryOperatorInput, extension: StringQueryOperatorInput, size: IntQueryOperatorInput, prettySize: StringQueryOperatorInput, modifiedTime: DateQueryOperatorInput, accessTime: DateQueryOperatorInput, changeTime: DateQueryOperatorInput, birthTime: DateQueryOperatorInput, root: StringQueryOperatorInput, dir: StringQueryOperatorInput, base: StringQueryOperatorInput, ext: StringQueryOperatorInput, name: StringQueryOperatorInput, relativeDirectory: StringQueryOperatorInput, dev: IntQueryOperatorInput, mode: IntQueryOperatorInput, nlink: IntQueryOperatorInput, uid: IntQueryOperatorInput, gid: IntQueryOperatorInput, rdev: IntQueryOperatorInput, ino: FloatQueryOperatorInput, atimeMs: FloatQueryOperatorInput, mtimeMs: FloatQueryOperatorInput, ctimeMs: FloatQueryOperatorInput, atime: DateQueryOperatorInput, mtime: DateQueryOperatorInput, ctime: DateQueryOperatorInput, birthtime: DateQueryOperatorInput, birthtimeMs: FloatQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): Directory + allDirectory(filter: DirectoryFilterInput, sort: [DirectorySortInput], skip: Int, limit: Int): DirectoryConnection! + site(buildTime: DateQueryOperatorInput, siteMetadata: SiteSiteMetadataFilterInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): Site + allSite(filter: SiteFilterInput, sort: [SiteSortInput], skip: Int, limit: Int): SiteConnection! + siteFunction(functionRoute: StringQueryOperatorInput, pluginName: StringQueryOperatorInput, originalAbsoluteFilePath: StringQueryOperatorInput, originalRelativeFilePath: StringQueryOperatorInput, relativeCompiledFilePath: StringQueryOperatorInput, absoluteCompiledFilePath: StringQueryOperatorInput, matchPath: StringQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SiteFunction + allSiteFunction(filter: SiteFunctionFilterInput, sort: [SiteFunctionSortInput], skip: Int, limit: Int): SiteFunctionConnection! + sitePage(path: StringQueryOperatorInput, component: StringQueryOperatorInput, internalComponentName: StringQueryOperatorInput, componentChunkName: StringQueryOperatorInput, matchPath: StringQueryOperatorInput, pageContext: JSONQueryOperatorInput, pluginCreator: SitePluginFilterInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SitePage + allSitePage(filter: SitePageFilterInput, sort: [SitePageSortInput], skip: Int, limit: Int): SitePageConnection! + sitePlugin(resolve: StringQueryOperatorInput, name: StringQueryOperatorInput, version: StringQueryOperatorInput, nodeAPIs: StringQueryOperatorInput, browserAPIs: StringQueryOperatorInput, ssrAPIs: StringQueryOperatorInput, pluginFilepath: StringQueryOperatorInput, pluginOptions: JSONQueryOperatorInput, packageJson: JSONQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SitePlugin + allSitePlugin(filter: SitePluginFilterInput, sort: [SitePluginSortInput], skip: Int, limit: Int): SitePluginConnection! + siteBuildMetadata(buildTime: DateQueryOperatorInput, id: StringQueryOperatorInput, parent: NodeFilterInput, children: NodeFilterListInput, internal: InternalFilterInput): SiteBuildMetadata + allSiteBuildMetadata(filter: SiteBuildMetadataFilterInput, sort: [SiteBuildMetadataSortInput], skip: Int, limit: Int): SiteBuildMetadataConnection! +} + +input StringQueryOperatorInput { + eq: String + ne: String + in: [String] + nin: [String] + regex: String + glob: String +} + +input IntQueryOperatorInput { + eq: Int + ne: Int + gt: Int + gte: Int + lt: Int + lte: Int + in: [Int] + nin: [Int] +} + +input DateQueryOperatorInput { + eq: Date + ne: Date + gt: Date + gte: Date + lt: Date + lte: Date + in: [Date] + nin: [Date] +} + +input FloatQueryOperatorInput { + eq: Float + ne: Float + gt: Float + gte: Float + lt: Float + lte: Float + in: [Float] + nin: [Float] +} + +input NodeFilterInput { + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input NodeFilterListInput { + elemMatch: NodeFilterInput +} + +input InternalFilterInput { + content: StringQueryOperatorInput + contentDigest: StringQueryOperatorInput + description: StringQueryOperatorInput + fieldOwners: StringQueryOperatorInput + ignoreType: BooleanQueryOperatorInput + mediaType: StringQueryOperatorInput + owner: StringQueryOperatorInput + type: StringQueryOperatorInput + contentFilePath: StringQueryOperatorInput +} + +input BooleanQueryOperatorInput { + eq: Boolean + ne: Boolean + in: [Boolean] + nin: [Boolean] +} + +type FileConnection { + totalCount: Int! + edges: [FileEdge!]! + nodes: [File!]! + pageInfo: PageInfo! + distinct(field: FileFieldSelector!): [String!]! + max(field: FileFieldSelector!): Float + min(field: FileFieldSelector!): Float + sum(field: FileFieldSelector!): Float + group(skip: Int, limit: Int, field: FileFieldSelector!): [FileGroupConnection!]! +} + +type FileEdge { + next: File + node: File! + previous: File +} + +type PageInfo { + currentPage: Int! + hasPreviousPage: Boolean! + hasNextPage: Boolean! + itemCount: Int! + pageCount: Int! + perPage: Int + totalCount: Int! +} + +input FileFieldSelector { + sourceInstanceName: FieldSelectorEnum + absolutePath: FieldSelectorEnum + relativePath: FieldSelectorEnum + extension: FieldSelectorEnum + size: FieldSelectorEnum + prettySize: FieldSelectorEnum + modifiedTime: FieldSelectorEnum + accessTime: FieldSelectorEnum + changeTime: FieldSelectorEnum + birthTime: FieldSelectorEnum + root: FieldSelectorEnum + dir: FieldSelectorEnum + base: FieldSelectorEnum + ext: FieldSelectorEnum + name: FieldSelectorEnum + relativeDirectory: FieldSelectorEnum + dev: FieldSelectorEnum + mode: FieldSelectorEnum + nlink: FieldSelectorEnum + uid: FieldSelectorEnum + gid: FieldSelectorEnum + rdev: FieldSelectorEnum + ino: FieldSelectorEnum + atimeMs: FieldSelectorEnum + mtimeMs: FieldSelectorEnum + ctimeMs: FieldSelectorEnum + atime: FieldSelectorEnum + mtime: FieldSelectorEnum + ctime: FieldSelectorEnum + birthtime: FieldSelectorEnum + birthtimeMs: FieldSelectorEnum + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +enum FieldSelectorEnum { + SELECT +} + +input NodeFieldSelector { + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +input InternalFieldSelector { + content: FieldSelectorEnum + contentDigest: FieldSelectorEnum + description: FieldSelectorEnum + fieldOwners: FieldSelectorEnum + ignoreType: FieldSelectorEnum + mediaType: FieldSelectorEnum + owner: FieldSelectorEnum + type: FieldSelectorEnum + contentFilePath: FieldSelectorEnum +} + +type FileGroupConnection { + totalCount: Int! + edges: [FileEdge!]! + nodes: [File!]! + pageInfo: PageInfo! + distinct(field: FileFieldSelector!): [String!]! + max(field: FileFieldSelector!): Float + min(field: FileFieldSelector!): Float + sum(field: FileFieldSelector!): Float + group(skip: Int, limit: Int, field: FileFieldSelector!): [FileGroupConnection!]! + field: String! + fieldValue: String +} + +input FileFilterInput { + sourceInstanceName: StringQueryOperatorInput + absolutePath: StringQueryOperatorInput + relativePath: StringQueryOperatorInput + extension: StringQueryOperatorInput + size: IntQueryOperatorInput + prettySize: StringQueryOperatorInput + modifiedTime: DateQueryOperatorInput + accessTime: DateQueryOperatorInput + changeTime: DateQueryOperatorInput + birthTime: DateQueryOperatorInput + root: StringQueryOperatorInput + dir: StringQueryOperatorInput + base: StringQueryOperatorInput + ext: StringQueryOperatorInput + name: StringQueryOperatorInput + relativeDirectory: StringQueryOperatorInput + dev: IntQueryOperatorInput + mode: IntQueryOperatorInput + nlink: IntQueryOperatorInput + uid: IntQueryOperatorInput + gid: IntQueryOperatorInput + rdev: IntQueryOperatorInput + ino: FloatQueryOperatorInput + atimeMs: FloatQueryOperatorInput + mtimeMs: FloatQueryOperatorInput + ctimeMs: FloatQueryOperatorInput + atime: DateQueryOperatorInput + mtime: DateQueryOperatorInput + ctime: DateQueryOperatorInput + birthtime: DateQueryOperatorInput + birthtimeMs: FloatQueryOperatorInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input FileSortInput { + sourceInstanceName: SortOrderEnum + absolutePath: SortOrderEnum + relativePath: SortOrderEnum + extension: SortOrderEnum + size: SortOrderEnum + prettySize: SortOrderEnum + modifiedTime: SortOrderEnum + accessTime: SortOrderEnum + changeTime: SortOrderEnum + birthTime: SortOrderEnum + root: SortOrderEnum + dir: SortOrderEnum + base: SortOrderEnum + ext: SortOrderEnum + name: SortOrderEnum + relativeDirectory: SortOrderEnum + dev: SortOrderEnum + mode: SortOrderEnum + nlink: SortOrderEnum + uid: SortOrderEnum + gid: SortOrderEnum + rdev: SortOrderEnum + ino: SortOrderEnum + atimeMs: SortOrderEnum + mtimeMs: SortOrderEnum + ctimeMs: SortOrderEnum + atime: SortOrderEnum + mtime: SortOrderEnum + ctime: SortOrderEnum + birthtime: SortOrderEnum + birthtimeMs: SortOrderEnum + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +enum SortOrderEnum { + ASC + DESC +} + +input NodeSortInput { + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +input InternalSortInput { + content: SortOrderEnum + contentDigest: SortOrderEnum + description: SortOrderEnum + fieldOwners: SortOrderEnum + ignoreType: SortOrderEnum + mediaType: SortOrderEnum + owner: SortOrderEnum + type: SortOrderEnum + contentFilePath: SortOrderEnum +} + +type DirectoryConnection { + totalCount: Int! + edges: [DirectoryEdge!]! + nodes: [Directory!]! + pageInfo: PageInfo! + distinct(field: DirectoryFieldSelector!): [String!]! + max(field: DirectoryFieldSelector!): Float + min(field: DirectoryFieldSelector!): Float + sum(field: DirectoryFieldSelector!): Float + group(skip: Int, limit: Int, field: DirectoryFieldSelector!): [DirectoryGroupConnection!]! +} + +type DirectoryEdge { + next: Directory + node: Directory! + previous: Directory +} + +input DirectoryFieldSelector { + sourceInstanceName: FieldSelectorEnum + absolutePath: FieldSelectorEnum + relativePath: FieldSelectorEnum + extension: FieldSelectorEnum + size: FieldSelectorEnum + prettySize: FieldSelectorEnum + modifiedTime: FieldSelectorEnum + accessTime: FieldSelectorEnum + changeTime: FieldSelectorEnum + birthTime: FieldSelectorEnum + root: FieldSelectorEnum + dir: FieldSelectorEnum + base: FieldSelectorEnum + ext: FieldSelectorEnum + name: FieldSelectorEnum + relativeDirectory: FieldSelectorEnum + dev: FieldSelectorEnum + mode: FieldSelectorEnum + nlink: FieldSelectorEnum + uid: FieldSelectorEnum + gid: FieldSelectorEnum + rdev: FieldSelectorEnum + ino: FieldSelectorEnum + atimeMs: FieldSelectorEnum + mtimeMs: FieldSelectorEnum + ctimeMs: FieldSelectorEnum + atime: FieldSelectorEnum + mtime: FieldSelectorEnum + ctime: FieldSelectorEnum + birthtime: FieldSelectorEnum + birthtimeMs: FieldSelectorEnum + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +type DirectoryGroupConnection { + totalCount: Int! + edges: [DirectoryEdge!]! + nodes: [Directory!]! + pageInfo: PageInfo! + distinct(field: DirectoryFieldSelector!): [String!]! + max(field: DirectoryFieldSelector!): Float + min(field: DirectoryFieldSelector!): Float + sum(field: DirectoryFieldSelector!): Float + group(skip: Int, limit: Int, field: DirectoryFieldSelector!): [DirectoryGroupConnection!]! + field: String! + fieldValue: String +} + +input DirectoryFilterInput { + sourceInstanceName: StringQueryOperatorInput + absolutePath: StringQueryOperatorInput + relativePath: StringQueryOperatorInput + extension: StringQueryOperatorInput + size: IntQueryOperatorInput + prettySize: StringQueryOperatorInput + modifiedTime: DateQueryOperatorInput + accessTime: DateQueryOperatorInput + changeTime: DateQueryOperatorInput + birthTime: DateQueryOperatorInput + root: StringQueryOperatorInput + dir: StringQueryOperatorInput + base: StringQueryOperatorInput + ext: StringQueryOperatorInput + name: StringQueryOperatorInput + relativeDirectory: StringQueryOperatorInput + dev: IntQueryOperatorInput + mode: IntQueryOperatorInput + nlink: IntQueryOperatorInput + uid: IntQueryOperatorInput + gid: IntQueryOperatorInput + rdev: IntQueryOperatorInput + ino: FloatQueryOperatorInput + atimeMs: FloatQueryOperatorInput + mtimeMs: FloatQueryOperatorInput + ctimeMs: FloatQueryOperatorInput + atime: DateQueryOperatorInput + mtime: DateQueryOperatorInput + ctime: DateQueryOperatorInput + birthtime: DateQueryOperatorInput + birthtimeMs: FloatQueryOperatorInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input DirectorySortInput { + sourceInstanceName: SortOrderEnum + absolutePath: SortOrderEnum + relativePath: SortOrderEnum + extension: SortOrderEnum + size: SortOrderEnum + prettySize: SortOrderEnum + modifiedTime: SortOrderEnum + accessTime: SortOrderEnum + changeTime: SortOrderEnum + birthTime: SortOrderEnum + root: SortOrderEnum + dir: SortOrderEnum + base: SortOrderEnum + ext: SortOrderEnum + name: SortOrderEnum + relativeDirectory: SortOrderEnum + dev: SortOrderEnum + mode: SortOrderEnum + nlink: SortOrderEnum + uid: SortOrderEnum + gid: SortOrderEnum + rdev: SortOrderEnum + ino: SortOrderEnum + atimeMs: SortOrderEnum + mtimeMs: SortOrderEnum + ctimeMs: SortOrderEnum + atime: SortOrderEnum + mtime: SortOrderEnum + ctime: SortOrderEnum + birthtime: SortOrderEnum + birthtimeMs: SortOrderEnum + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +input SiteSiteMetadataFilterInput { + title: StringQueryOperatorInput + description: StringQueryOperatorInput +} + +type SiteConnection { + totalCount: Int! + edges: [SiteEdge!]! + nodes: [Site!]! + pageInfo: PageInfo! + distinct(field: SiteFieldSelector!): [String!]! + max(field: SiteFieldSelector!): Float + min(field: SiteFieldSelector!): Float + sum(field: SiteFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteFieldSelector!): [SiteGroupConnection!]! +} + +type SiteEdge { + next: Site + node: Site! + previous: Site +} + +input SiteFieldSelector { + buildTime: FieldSelectorEnum + siteMetadata: SiteSiteMetadataFieldSelector + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +input SiteSiteMetadataFieldSelector { + title: FieldSelectorEnum + description: FieldSelectorEnum +} + +type SiteGroupConnection { + totalCount: Int! + edges: [SiteEdge!]! + nodes: [Site!]! + pageInfo: PageInfo! + distinct(field: SiteFieldSelector!): [String!]! + max(field: SiteFieldSelector!): Float + min(field: SiteFieldSelector!): Float + sum(field: SiteFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteFieldSelector!): [SiteGroupConnection!]! + field: String! + fieldValue: String +} + +input SiteFilterInput { + buildTime: DateQueryOperatorInput + siteMetadata: SiteSiteMetadataFilterInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input SiteSortInput { + buildTime: SortOrderEnum + siteMetadata: SiteSiteMetadataSortInput + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +input SiteSiteMetadataSortInput { + title: SortOrderEnum + description: SortOrderEnum +} + +type SiteFunctionConnection { + totalCount: Int! + edges: [SiteFunctionEdge!]! + nodes: [SiteFunction!]! + pageInfo: PageInfo! + distinct(field: SiteFunctionFieldSelector!): [String!]! + max(field: SiteFunctionFieldSelector!): Float + min(field: SiteFunctionFieldSelector!): Float + sum(field: SiteFunctionFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteFunctionFieldSelector!): [SiteFunctionGroupConnection!]! +} + +type SiteFunctionEdge { + next: SiteFunction + node: SiteFunction! + previous: SiteFunction +} + +input SiteFunctionFieldSelector { + functionRoute: FieldSelectorEnum + pluginName: FieldSelectorEnum + originalAbsoluteFilePath: FieldSelectorEnum + originalRelativeFilePath: FieldSelectorEnum + relativeCompiledFilePath: FieldSelectorEnum + absoluteCompiledFilePath: FieldSelectorEnum + matchPath: FieldSelectorEnum + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +type SiteFunctionGroupConnection { + totalCount: Int! + edges: [SiteFunctionEdge!]! + nodes: [SiteFunction!]! + pageInfo: PageInfo! + distinct(field: SiteFunctionFieldSelector!): [String!]! + max(field: SiteFunctionFieldSelector!): Float + min(field: SiteFunctionFieldSelector!): Float + sum(field: SiteFunctionFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteFunctionFieldSelector!): [SiteFunctionGroupConnection!]! + field: String! + fieldValue: String +} + +input SiteFunctionFilterInput { + functionRoute: StringQueryOperatorInput + pluginName: StringQueryOperatorInput + originalAbsoluteFilePath: StringQueryOperatorInput + originalRelativeFilePath: StringQueryOperatorInput + relativeCompiledFilePath: StringQueryOperatorInput + absoluteCompiledFilePath: StringQueryOperatorInput + matchPath: StringQueryOperatorInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input SiteFunctionSortInput { + functionRoute: SortOrderEnum + pluginName: SortOrderEnum + originalAbsoluteFilePath: SortOrderEnum + originalRelativeFilePath: SortOrderEnum + relativeCompiledFilePath: SortOrderEnum + absoluteCompiledFilePath: SortOrderEnum + matchPath: SortOrderEnum + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +input JSONQueryOperatorInput { + eq: JSON + ne: JSON + in: [JSON] + nin: [JSON] + regex: JSON + glob: JSON +} + +input SitePluginFilterInput { + resolve: StringQueryOperatorInput + name: StringQueryOperatorInput + version: StringQueryOperatorInput + nodeAPIs: StringQueryOperatorInput + browserAPIs: StringQueryOperatorInput + ssrAPIs: StringQueryOperatorInput + pluginFilepath: StringQueryOperatorInput + pluginOptions: JSONQueryOperatorInput + packageJson: JSONQueryOperatorInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +type SitePageConnection { + totalCount: Int! + edges: [SitePageEdge!]! + nodes: [SitePage!]! + pageInfo: PageInfo! + distinct(field: SitePageFieldSelector!): [String!]! + max(field: SitePageFieldSelector!): Float + min(field: SitePageFieldSelector!): Float + sum(field: SitePageFieldSelector!): Float + group(skip: Int, limit: Int, field: SitePageFieldSelector!): [SitePageGroupConnection!]! +} + +type SitePageEdge { + next: SitePage + node: SitePage! + previous: SitePage +} + +input SitePageFieldSelector { + path: FieldSelectorEnum + component: FieldSelectorEnum + internalComponentName: FieldSelectorEnum + componentChunkName: FieldSelectorEnum + matchPath: FieldSelectorEnum + pageContext: FieldSelectorEnum + pluginCreator: SitePluginFieldSelector + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +input SitePluginFieldSelector { + resolve: FieldSelectorEnum + name: FieldSelectorEnum + version: FieldSelectorEnum + nodeAPIs: FieldSelectorEnum + browserAPIs: FieldSelectorEnum + ssrAPIs: FieldSelectorEnum + pluginFilepath: FieldSelectorEnum + pluginOptions: FieldSelectorEnum + packageJson: FieldSelectorEnum + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +type SitePageGroupConnection { + totalCount: Int! + edges: [SitePageEdge!]! + nodes: [SitePage!]! + pageInfo: PageInfo! + distinct(field: SitePageFieldSelector!): [String!]! + max(field: SitePageFieldSelector!): Float + min(field: SitePageFieldSelector!): Float + sum(field: SitePageFieldSelector!): Float + group(skip: Int, limit: Int, field: SitePageFieldSelector!): [SitePageGroupConnection!]! + field: String! + fieldValue: String +} + +input SitePageFilterInput { + path: StringQueryOperatorInput + component: StringQueryOperatorInput + internalComponentName: StringQueryOperatorInput + componentChunkName: StringQueryOperatorInput + matchPath: StringQueryOperatorInput + pageContext: JSONQueryOperatorInput + pluginCreator: SitePluginFilterInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input SitePageSortInput { + path: SortOrderEnum + component: SortOrderEnum + internalComponentName: SortOrderEnum + componentChunkName: SortOrderEnum + matchPath: SortOrderEnum + pageContext: SortOrderEnum + pluginCreator: SitePluginSortInput + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +input SitePluginSortInput { + resolve: SortOrderEnum + name: SortOrderEnum + version: SortOrderEnum + nodeAPIs: SortOrderEnum + browserAPIs: SortOrderEnum + ssrAPIs: SortOrderEnum + pluginFilepath: SortOrderEnum + pluginOptions: SortOrderEnum + packageJson: SortOrderEnum + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} + +type SitePluginConnection { + totalCount: Int! + edges: [SitePluginEdge!]! + nodes: [SitePlugin!]! + pageInfo: PageInfo! + distinct(field: SitePluginFieldSelector!): [String!]! + max(field: SitePluginFieldSelector!): Float + min(field: SitePluginFieldSelector!): Float + sum(field: SitePluginFieldSelector!): Float + group(skip: Int, limit: Int, field: SitePluginFieldSelector!): [SitePluginGroupConnection!]! +} + +type SitePluginEdge { + next: SitePlugin + node: SitePlugin! + previous: SitePlugin +} + +type SitePluginGroupConnection { + totalCount: Int! + edges: [SitePluginEdge!]! + nodes: [SitePlugin!]! + pageInfo: PageInfo! + distinct(field: SitePluginFieldSelector!): [String!]! + max(field: SitePluginFieldSelector!): Float + min(field: SitePluginFieldSelector!): Float + sum(field: SitePluginFieldSelector!): Float + group(skip: Int, limit: Int, field: SitePluginFieldSelector!): [SitePluginGroupConnection!]! + field: String! + fieldValue: String +} + +type SiteBuildMetadataConnection { + totalCount: Int! + edges: [SiteBuildMetadataEdge!]! + nodes: [SiteBuildMetadata!]! + pageInfo: PageInfo! + distinct(field: SiteBuildMetadataFieldSelector!): [String!]! + max(field: SiteBuildMetadataFieldSelector!): Float + min(field: SiteBuildMetadataFieldSelector!): Float + sum(field: SiteBuildMetadataFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteBuildMetadataFieldSelector!): [SiteBuildMetadataGroupConnection!]! +} + +type SiteBuildMetadataEdge { + next: SiteBuildMetadata + node: SiteBuildMetadata! + previous: SiteBuildMetadata +} + +input SiteBuildMetadataFieldSelector { + buildTime: FieldSelectorEnum + id: FieldSelectorEnum + parent: NodeFieldSelector + children: NodeFieldSelector + internal: InternalFieldSelector +} + +type SiteBuildMetadataGroupConnection { + totalCount: Int! + edges: [SiteBuildMetadataEdge!]! + nodes: [SiteBuildMetadata!]! + pageInfo: PageInfo! + distinct(field: SiteBuildMetadataFieldSelector!): [String!]! + max(field: SiteBuildMetadataFieldSelector!): Float + min(field: SiteBuildMetadataFieldSelector!): Float + sum(field: SiteBuildMetadataFieldSelector!): Float + group(skip: Int, limit: Int, field: SiteBuildMetadataFieldSelector!): [SiteBuildMetadataGroupConnection!]! + field: String! + fieldValue: String +} + +input SiteBuildMetadataFilterInput { + buildTime: DateQueryOperatorInput + id: StringQueryOperatorInput + parent: NodeFilterInput + children: NodeFilterListInput + internal: InternalFilterInput +} + +input SiteBuildMetadataSortInput { + buildTime: SortOrderEnum + id: SortOrderEnum + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput +} +" +`; diff --git a/packages/gatsby/src/schema/__tests__/build-schema.js b/packages/gatsby/src/schema/__tests__/build-schema.js index 808b2ec6b2223..d13f55ecce222 100644 --- a/packages/gatsby/src/schema/__tests__/build-schema.js +++ b/packages/gatsby/src/schema/__tests__/build-schema.js @@ -20,6 +20,9 @@ import { } from "../types/type-builders" const withResolverContext = require(`../context`) +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip +const itWhenV5 = _CFLAGS_.GATSBY_MAJOR === `5` ? it : it.skip + /** * Helper identity function to trigger syntax highlighting in code editors. * (`gql` name serve as a hint) @@ -61,7 +64,12 @@ describe(`Built-in types`, () => { store.dispatch({ type: `DELETE_CACHE` }) }) - it(`includes built-in types`, async () => { + itWhenV4(`includes built-in types (v4)`, async () => { + const schema = await buildSchema() + expect(printSchema(schema)).toMatchSnapshot() + }) + + itWhenV5(`includes built-in types (v5)`, async () => { const schema = await buildSchema() expect(printSchema(schema)).toMatchSnapshot() }) @@ -1397,67 +1405,138 @@ describe(`Build schema`, () => { `) }) - it(`Can reference derived types when merging types`, async () => { - createTypes(gql` - # create initial type composer - type TypeCreatedBySourcePlugin implements Node { - id: ID! - someField: String - } - `) - createTypes([ - buildInterfaceType({ - name: `SharedInterface`, - fields: { - id: `ID!`, - child_items: { - type: `[SharedInterface]`, - args: { - // referencing derived type - sort: `SharedInterfaceSortInput`, + itWhenV4( + `Can reference derived types when merging types (v4)`, + async () => { + createTypes(gql` + # create initial type composer + type TypeCreatedBySourcePlugin implements Node { + id: ID! + someField: String + } + `) + createTypes([ + buildInterfaceType({ + name: `SharedInterface`, + fields: { + id: `ID!`, + child_items: { + type: `[SharedInterface]`, + args: { + // referencing derived type + sort: `SharedInterfaceSortInput`, + }, }, }, - }, - interfaces: [`Node`], - }), - buildObjectType({ - name: `TypeCreatedBySourcePlugin`, - fields: { - id: `ID!`, - child_items: { - type: `[SharedInterface]`, - args: { - sort: `SharedInterfaceSortInput`, + interfaces: [`Node`], + }), + buildObjectType({ + name: `TypeCreatedBySourcePlugin`, + fields: { + id: `ID!`, + child_items: { + type: `[SharedInterface]`, + args: { + sort: `SharedInterfaceSortInput`, + }, + resolve: (_, args) => [], }, - resolve: (_, args) => [], }, - }, - interfaces: [`Node`, `SharedInterface`], - }), - ]) - - // implicit assertion is that building schema doesn't throw in the process - const schema = await buildSchema() - expect(printType(schema.getType(`TypeCreatedBySourcePlugin`))) - .toMatchInlineSnapshot(` - "type TypeCreatedBySourcePlugin implements Node & SharedInterface { - id: ID! - someField: String - child_items(sort: SharedInterfaceSortInput): [SharedInterface] - parent: Node - children: [Node!]! - internal: Internal! - }" - `) + interfaces: [`Node`, `SharedInterface`], + }), + ]) + + // implicit assertion is that building schema doesn't throw in the process + const schema = await buildSchema() + expect(printType(schema.getType(`TypeCreatedBySourcePlugin`))) + .toMatchInlineSnapshot(` + "type TypeCreatedBySourcePlugin implements Node & SharedInterface { + id: ID! + someField: String + child_items(sort: SharedInterfaceSortInput): [SharedInterface] + parent: Node + children: [Node!]! + internal: Internal! + }" + `) + + expect(printType(schema.getType(`SharedInterfaceSortInput`))) + .toMatchInlineSnapshot(` + "input SharedInterfaceSortInput { + fields: [SharedInterfaceFieldsEnum] + order: [SortOrderEnum] = [ASC] + }" + `) + } + ) - expect(printType(schema.getType(`SharedInterfaceSortInput`))) - .toMatchInlineSnapshot(` - "input SharedInterfaceSortInput { - fields: [SharedInterfaceFieldsEnum] - order: [SortOrderEnum] = [ASC] - }" - `) - }) + itWhenV5( + `Can reference derived types when merging types (v5)`, + async () => { + createTypes(gql` + # create initial type composer + type TypeCreatedBySourcePlugin implements Node { + id: ID! + someField: String + } + `) + createTypes([ + buildInterfaceType({ + name: `SharedInterface`, + fields: { + id: `ID!`, + child_items: { + type: `[SharedInterface]`, + args: { + // referencing derived type + sort: `SharedInterfaceSortInput`, + }, + }, + }, + interfaces: [`Node`], + }), + buildObjectType({ + name: `TypeCreatedBySourcePlugin`, + fields: { + id: `ID!`, + child_items: { + type: `[SharedInterface]`, + args: { + sort: `SharedInterfaceSortInput`, + }, + resolve: (_, args) => [], + }, + }, + interfaces: [`Node`, `SharedInterface`], + }), + ]) + + // implicit assertion is that building schema doesn't throw in the process + const schema = await buildSchema() + expect(printType(schema.getType(`TypeCreatedBySourcePlugin`))) + .toMatchInlineSnapshot(` + "type TypeCreatedBySourcePlugin implements Node & SharedInterface { + id: ID! + someField: String + child_items(sort: SharedInterfaceSortInput): [SharedInterface] + parent: Node + children: [Node!]! + internal: Internal! + }" + `) + + expect(printType(schema.getType(`SharedInterfaceSortInput`))) + .toMatchInlineSnapshot(` + "input SharedInterfaceSortInput { + id: SortOrderEnum + child_items: SharedInterfaceSortInput + parent: NodeSortInput + children: NodeSortInput + internal: InternalSortInput + }" + `) + } + ) }) it(`allows renaming and merging nested types`, async () => { diff --git a/packages/gatsby/src/schema/__tests__/kitchen-sink.js b/packages/gatsby/src/schema/__tests__/kitchen-sink.js index 123cbcada26b4..c6ac7dc2fdebf 100644 --- a/packages/gatsby/src/schema/__tests__/kitchen-sink.js +++ b/packages/gatsby/src/schema/__tests__/kitchen-sink.js @@ -8,6 +8,8 @@ const { GraphQLList, GraphQLObjectType, getNamedType, + parse, + print, } = require(`graphql`) const { store } = require(`../../redux`) const { actions } = require(`../../redux/actions`) @@ -16,6 +18,7 @@ const fs = require(`fs-extra`) const path = require(`path`) const { slash } = require(`gatsby-core-utils`) const withResolverContext = require(`../context`) +const { tranformDocument } = require(`../../query/transform-document`) jest.mock(`../../utils/api-runner-node`) const apiRunnerNode = require(`../../utils/api-runner-node`) @@ -47,8 +50,14 @@ describe(`Kitchen sink schema test`, () => { let schema let schemaComposer - const runQuery = query => - graphql( + const runQuery = query => { + if (_CFLAGS_.GATSBY_MAJOR === `5`) { + const inputAst = typeof query === `string` ? parse(query) : query + const { ast } = tranformDocument(inputAst) + query = print(ast) + } + + return graphql( schema, query, undefined, @@ -59,6 +68,7 @@ describe(`Kitchen sink schema test`, () => { customContext: {}, }) ) + } beforeAll(async () => { apiRunnerNode.mockImplementation((api, ...args) => { diff --git a/packages/gatsby/src/schema/__tests__/queries.js b/packages/gatsby/src/schema/__tests__/queries.js index 5894a92be2ddd..692d0f4ac3687 100644 --- a/packages/gatsby/src/schema/__tests__/queries.js +++ b/packages/gatsby/src/schema/__tests__/queries.js @@ -1,8 +1,9 @@ -const { graphql } = require(`graphql`) +const { graphql, parse, print } = require(`graphql`) const { store } = require(`../../redux`) const { actions } = require(`../../redux/actions`) const { build } = require(`..`) const withResolverContext = require(`../context`) +const { tranformDocument } = require(`../../query/transform-document`) jest.mock(`../../utils/api-runner-node`) const apiRunnerNode = require(`../../utils/api-runner-node`) @@ -46,8 +47,14 @@ describe(`Query schema`, () => { let schema let schemaComposer - const runQuery = (query, variables) => - graphql( + const runQuery = (query, variables) => { + if (_CFLAGS_.GATSBY_MAJOR === `5`) { + const inputAst = typeof query === `string` ? parse(query) : query + const { ast } = tranformDocument(inputAst) + query = print(ast) + } + + return graphql( schema, query, undefined, @@ -57,6 +64,7 @@ describe(`Query schema`, () => { }), variables ) + } beforeAll(async () => { apiRunnerNode.mockImplementation(async (api, ...args) => { diff --git a/packages/gatsby/src/schema/types/sort.ts b/packages/gatsby/src/schema/types/sort.ts index 988f807211edf..7c3401fe2a581 100644 --- a/packages/gatsby/src/schema/types/sort.ts +++ b/packages/gatsby/src/schema/types/sort.ts @@ -193,7 +193,7 @@ export const getSortInputNestedObjects = ({ const itc = convertToNestedInputType({ schemaComposer, typeComposer, - postfix: `SortInputProp2`, + postfix: `SortInput`, onEnter: ({ fieldName, typeComposer }): IVisitContext => { const sortable = typeComposer instanceof UnionTypeComposer || diff --git a/packages/gatsby/src/utils/__tests__/browserslist.js b/packages/gatsby/src/utils/__tests__/browserslist.js index 0014f4003cff3..479772edb53f7 100644 --- a/packages/gatsby/src/utils/__tests__/browserslist.js +++ b/packages/gatsby/src/utils/__tests__/browserslist.js @@ -11,6 +11,8 @@ const { findConfig: mockedFindConfig } = require(`browserslist/node`) const BASE = path.resolve(`.`) +const itWhenV4 = _CFLAGS_.GATSBY_MAJOR !== `5` ? it : it.skip + describe(`browserslist`, () => { it(`prefers returned browserslist results`, () => { const defaults = [`IE 11`] @@ -47,13 +49,16 @@ describe(`browserslist`, () => { expect(hasES6ModuleSupport(BASE)).toBe(true) }) - it(`hasES6ModuleSupport returns false if any browser does not support es6 modules`, () => { - const defaults = [`IE 11`] - mockedFindConfig.mockReturnValueOnce({ - defaults, - }) - getBrowsersList(BASE) + itWhenV4( + `hasES6ModuleSupport returns false if any browser does not support es6 modules`, + () => { + const defaults = [`IE 11`] + mockedFindConfig.mockReturnValueOnce({ + defaults, + }) + getBrowsersList(BASE) - expect(hasES6ModuleSupport(BASE)).toBe(false) - }) + expect(hasES6ModuleSupport(BASE)).toBe(false) + } + ) }) diff --git a/packages/gatsby/src/utils/parcel/__tests__/__snapshots__/compile-gatsby-files.ts.snap b/packages/gatsby/src/utils/parcel/__tests__/__snapshots__/compile-gatsby-files.ts.snap deleted file mode 100644 index 28b4507270d94..0000000000000 --- a/packages/gatsby/src/utils/parcel/__tests__/__snapshots__/compile-gatsby-files.ts.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`gatsby file compilation constructBundler should construct Parcel relative to passed directory 1`] = ` -Object { - "cache": undefined, - "cacheDir": "/packages/gatsby/src/utils/parcel/__tests__/fixtures/js/.cache/.parcel-cache", - "defaultConfig": "/packages/gatsby-parcel-config/lib/index.json", - "entries": Array [ - "/packages/gatsby/src/utils/parcel/__tests__/fixtures/js/gatsby-+(node|config).ts", - "/packages/gatsby/src/utils/parcel/__tests__/fixtures/js/plugins/**/gatsby-+(node|config).ts", - ], - "mode": "production", - "targets": Object { - "root": Object { - "distDir": "/packages/gatsby/src/utils/parcel/__tests__/fixtures/js/.cache/compiled", - "engines": Object { - "node": ">= 14.15.0", - }, - "includeNodeModules": false, - "outputFormat": "commonjs", - "sourceMap": false, - }, - }, -} -`; diff --git a/packages/gatsby/src/utils/parcel/__tests__/compile-gatsby-files.ts b/packages/gatsby/src/utils/parcel/__tests__/compile-gatsby-files.ts index 3f2e0f10298d4..845360af684eb 100644 --- a/packages/gatsby/src/utils/parcel/__tests__/compile-gatsby-files.ts +++ b/packages/gatsby/src/utils/parcel/__tests__/compile-gatsby-files.ts @@ -67,7 +67,7 @@ describe(`gatsby file compilation`, () => { it(`should construct Parcel relative to passed directory`, () => { const { options } = constructParcel(dir.js) as IMockedParcel - expect(options).toMatchSnapshot({ + expect(options).toMatchObject({ entries: [ `${dir.js}/${gatsbyFileRegex}`, `${dir.js}/plugins/**/${gatsbyFileRegex}`, @@ -75,6 +75,9 @@ describe(`gatsby file compilation`, () => { targets: { root: { distDir: `${dir.js}/${COMPILED_CACHE_DIR}`, + engines: { + node: _CFLAGS_.GATSBY_MAJOR !== `5` ? `>= 14.15.0` : `>= 18.0.0`, + }, }, }, cacheDir: `${dir.js}/${PARCEL_CACHE_DIR}`,