From 115ca05f83209e3a0cd94f4a0ff83bf587182477 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Fri, 6 Dec 2019 16:26:41 +0100 Subject: [PATCH] Revert moving introspection_query.py to get_introspection_query.py This change belongs to the GraphQL.js v15 branch, but we are still replicating the v14 branch. We should be faithful to what we advertise in version_js, which is currently GraphQL.js version 14.5.8. --- .travis.yml | 2 +- src/graphql/utilities/__init__.py | 2 +- src/graphql/utilities/introspection_from_schema.py | 2 +- .../{get_introspection_query.py => introspection_query.py} | 0 tests/benchmarks/test_introspection_from_schema.py | 4 ++-- tests/benchmarks/test_validate_gql.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) rename src/graphql/utilities/{get_introspection_query.py => introspection_query.py} (100%) diff --git a/.travis.yml b/.travis.yml index 31e679e2..aa7073d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ deploy: provider: pypi distributions: sdist bdist_wheel on: - branch: master + branch: js-14.x.x tags: true python: 3.7 skip_existing: true diff --git a/src/graphql/utilities/__init__.py b/src/graphql/utilities/__init__.py index ad0eb480..37599cab 100644 --- a/src/graphql/utilities/__init__.py +++ b/src/graphql/utilities/__init__.py @@ -5,7 +5,7 @@ """ # Produce the GraphQL query recommended for a full schema introspection. -from .get_introspection_query import get_introspection_query +from .introspection_query import get_introspection_query # Get the target Operation from a Document. from .get_operation_ast import get_operation_ast diff --git a/src/graphql/utilities/introspection_from_schema.py b/src/graphql/utilities/introspection_from_schema.py index 818c6325..5a075ab4 100644 --- a/src/graphql/utilities/introspection_from_schema.py +++ b/src/graphql/utilities/introspection_from_schema.py @@ -3,7 +3,7 @@ from ..error import GraphQLError from ..language import parse from ..type import GraphQLSchema -from .get_introspection_query import get_introspection_query +from .introspection_query import get_introspection_query __all__ = ["introspection_from_schema"] diff --git a/src/graphql/utilities/get_introspection_query.py b/src/graphql/utilities/introspection_query.py similarity index 100% rename from src/graphql/utilities/get_introspection_query.py rename to src/graphql/utilities/introspection_query.py diff --git a/tests/benchmarks/test_introspection_from_schema.py b/tests/benchmarks/test_introspection_from_schema.py index 80c0195a..6da1e0f9 100644 --- a/tests/benchmarks/test_introspection_from_schema.py +++ b/tests/benchmarks/test_introspection_from_schema.py @@ -1,5 +1,5 @@ from graphql import build_schema, parse, execute -from graphql.utilities import get_introspection_query +from graphql.utilities import introspection_query # noinspection PyUnresolvedReferences from ..fixtures import big_schema_sdl # noqa: F401 @@ -7,6 +7,6 @@ def test_execute_introspection_query(benchmark, big_schema_sdl): # noqa: F811 schema = build_schema(big_schema_sdl, assume_valid=True) - query = parse(get_introspection_query()) + query = parse(introspection_query.get_introspection_query()) result = benchmark(lambda: execute(schema, query)) assert result.errors is None diff --git a/tests/benchmarks/test_validate_gql.py b/tests/benchmarks/test_validate_gql.py index 6b08d4b5..ea62f228 100644 --- a/tests/benchmarks/test_validate_gql.py +++ b/tests/benchmarks/test_validate_gql.py @@ -1,5 +1,5 @@ from graphql import build_schema, parse, validate -from graphql.utilities import get_introspection_query +from graphql.utilities import introspection_query # noinspection PyUnresolvedReferences from ..fixtures import big_schema_sdl # noqa: F401 @@ -7,6 +7,6 @@ def test_validate_introspection_query(benchmark, big_schema_sdl): # noqa: F811 schema = build_schema(big_schema_sdl, assume_valid=True) - query = parse(get_introspection_query()) + query = parse(introspection_query.get_introspection_query()) result = benchmark(lambda: validate(schema, query)) assert result == []