Skip to content

Commit

Permalink
Revert moving introspection_query.py to get_introspection_query.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Cito committed Dec 6, 2019
1 parent b7e6eeb commit 115ca05
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/utilities/introspection_from_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions tests/benchmarks/test_introspection_from_schema.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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


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
4 changes: 2 additions & 2 deletions tests/benchmarks/test_validate_gql.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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


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 == []

0 comments on commit 115ca05

Please sign in to comment.