From 6ca44248ffbcca13dbba7c60756664348c116f38 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sun, 25 Aug 2019 14:58:43 +0300 Subject: [PATCH] Move 'introspectionQuery.js' to 'getIntrospectionQuery.js' --- src/type/__tests__/introspection-test.js | 2 +- .../__tests__/introspectionFromSchema-benchmark.js | 2 +- src/utilities/buildClientSchema.js | 2 +- ...introspectionQuery.js => getIntrospectionQuery.js} | 0 src/utilities/index.js | 11 ++++------- src/utilities/introspectionFromSchema.js | 2 +- src/validation/__tests__/validateGQL-benchmark.js | 2 +- tstypes/utilities/buildClientSchema.d.ts | 2 +- ...ospectionQuery.d.ts => getIntrospectionQuery.d.ts} | 0 tstypes/utilities/index.d.ts | 8 ++++---- tstypes/utilities/introspectionFromSchema.d.ts | 5 ++++- 11 files changed, 18 insertions(+), 18 deletions(-) rename src/utilities/{introspectionQuery.js => getIntrospectionQuery.js} (100%) rename tstypes/utilities/{introspectionQuery.d.ts => getIntrospectionQuery.d.ts} (100%) diff --git a/src/type/__tests__/introspection-test.js b/src/type/__tests__/introspection-test.js index fd5473a65d..2c7b35a850 100644 --- a/src/type/__tests__/introspection-test.js +++ b/src/type/__tests__/introspection-test.js @@ -8,7 +8,7 @@ import invariant from '../../jsutils/invariant'; import { missingFieldArgMessage } from '../../validation/rules/ProvidedRequiredArguments'; import { graphqlSync } from '../../graphql'; -import { getIntrospectionQuery } from '../../utilities/introspectionQuery'; +import { getIntrospectionQuery } from '../../utilities/getIntrospectionQuery'; import { GraphQLSchema } from '../schema'; import { GraphQLString } from '../scalars'; diff --git a/src/utilities/__tests__/introspectionFromSchema-benchmark.js b/src/utilities/__tests__/introspectionFromSchema-benchmark.js index 8aa33d9a60..f591b8a889 100644 --- a/src/utilities/__tests__/introspectionFromSchema-benchmark.js +++ b/src/utilities/__tests__/introspectionFromSchema-benchmark.js @@ -4,7 +4,7 @@ import { parse } from '../../language/parser'; import { execute } from '../../execution/execute'; import { buildSchema } from '../buildASTSchema'; -import { getIntrospectionQuery } from '../introspectionQuery'; +import { getIntrospectionQuery } from '../getIntrospectionQuery'; import { bigSchemaSDL } from '../../__fixtures__'; diff --git a/src/utilities/buildClientSchema.js b/src/utilities/buildClientSchema.js index 6796f8ffd2..d2da5d9fe4 100644 --- a/src/utilities/buildClientSchema.js +++ b/src/utilities/buildClientSchema.js @@ -50,7 +50,7 @@ import { type IntrospectionInputTypeRef, type IntrospectionOutputTypeRef, type IntrospectionNamedTypeRef, -} from './introspectionQuery'; +} from './getIntrospectionQuery'; type Options = {| ...GraphQLSchemaValidationOptions, diff --git a/src/utilities/introspectionQuery.js b/src/utilities/getIntrospectionQuery.js similarity index 100% rename from src/utilities/introspectionQuery.js rename to src/utilities/getIntrospectionQuery.js diff --git a/src/utilities/index.js b/src/utilities/index.js index 50561a9ce9..5641eea1be 100644 --- a/src/utilities/index.js +++ b/src/utilities/index.js @@ -1,11 +1,8 @@ // @flow strict -// The GraphQL query recommended for a full schema introspection. -export { - // Produce the GraphQL query recommended for a full schema introspection. - // Accepts optional IntrospectionOptions. - getIntrospectionQuery, -} from './introspectionQuery'; +// Produce the GraphQL query recommended for a full schema introspection. +// Accepts optional IntrospectionOptions. +export { getIntrospectionQuery } from './getIntrospectionQuery'; export type { IntrospectionOptions, @@ -30,7 +27,7 @@ export type { IntrospectionInputValue, IntrospectionEnumValue, IntrospectionDirective, -} from './introspectionQuery'; +} from './getIntrospectionQuery'; // Gets the target Operation from a Document. export { getOperationAST } from './getOperationAST'; diff --git a/src/utilities/introspectionFromSchema.js b/src/utilities/introspectionFromSchema.js index 48b39819ba..67fb28e39d 100644 --- a/src/utilities/introspectionFromSchema.js +++ b/src/utilities/introspectionFromSchema.js @@ -11,7 +11,7 @@ import { type IntrospectionQuery, type IntrospectionOptions, getIntrospectionQuery, -} from './introspectionQuery'; +} from './getIntrospectionQuery'; /** * Build an IntrospectionQuery from a GraphQLSchema diff --git a/src/validation/__tests__/validateGQL-benchmark.js b/src/validation/__tests__/validateGQL-benchmark.js index fce3b0f2e9..509fd7cdc9 100644 --- a/src/validation/__tests__/validateGQL-benchmark.js +++ b/src/validation/__tests__/validateGQL-benchmark.js @@ -2,7 +2,7 @@ import { parse } from '../../language/parser'; import { buildSchema } from '../../utilities/buildASTSchema'; -import { getIntrospectionQuery } from '../../utilities/introspectionQuery'; +import { getIntrospectionQuery } from '../../utilities/getIntrospectionQuery'; import { validate } from '../validate'; diff --git a/tstypes/utilities/buildClientSchema.d.ts b/tstypes/utilities/buildClientSchema.d.ts index 42bd106cf1..967bf9b729 100644 --- a/tstypes/utilities/buildClientSchema.d.ts +++ b/tstypes/utilities/buildClientSchema.d.ts @@ -1,4 +1,4 @@ -import { IntrospectionQuery } from './introspectionQuery'; +import { IntrospectionQuery } from './getIntrospectionQuery'; import { GraphQLSchema, GraphQLSchemaValidationOptions } from '../type/schema'; interface Options extends GraphQLSchemaValidationOptions {} diff --git a/tstypes/utilities/introspectionQuery.d.ts b/tstypes/utilities/getIntrospectionQuery.d.ts similarity index 100% rename from tstypes/utilities/introspectionQuery.d.ts rename to tstypes/utilities/getIntrospectionQuery.d.ts diff --git a/tstypes/utilities/index.d.ts b/tstypes/utilities/index.d.ts index 2946c2286a..7d2d675dde 100644 --- a/tstypes/utilities/index.d.ts +++ b/tstypes/utilities/index.d.ts @@ -1,7 +1,7 @@ -// The GraphQL query recommended for a full schema introspection. -export { getIntrospectionQuery } from './introspectionQuery'; - export { + // Produce the GraphQL query recommended for a full schema introspection. + // Accepts optional IntrospectionOptions. + getIntrospectionQuery, IntrospectionOptions, IntrospectionQuery, IntrospectionSchema, @@ -24,7 +24,7 @@ export { IntrospectionInputValue, IntrospectionEnumValue, IntrospectionDirective, -} from './introspectionQuery'; +} from './getIntrospectionQuery'; // Gets the target Operation from a Document export { getOperationAST } from './getOperationAST'; diff --git a/tstypes/utilities/introspectionFromSchema.d.ts b/tstypes/utilities/introspectionFromSchema.d.ts index e0dcd63348..b03a79871f 100644 --- a/tstypes/utilities/introspectionFromSchema.d.ts +++ b/tstypes/utilities/introspectionFromSchema.d.ts @@ -1,5 +1,8 @@ import { GraphQLSchema } from '../type/schema'; -import { IntrospectionQuery, IntrospectionOptions } from './introspectionQuery'; +import { + IntrospectionQuery, + IntrospectionOptions, +} from './getIntrospectionQuery'; /** * Build an IntrospectionQuery from a GraphQLSchema