Skip to content

Commit 8fc685d

Browse files
committed
Improved sorts and schema logic
1 parent 26d03c1 commit 8fc685d

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

graphql/execution/executor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
get_operation_root_type)
1414
from .executors.sync import SyncExecutor
1515

16-
1716
logger = logging.getLogger(__name__)
1817

1918

graphql/type/directives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import collections
22

3+
from ..utils.assert_valid_name import assert_valid_name
34
from .definition import GraphQLArgument, GraphQLNonNull
45
from .scalars import GraphQLBoolean
5-
from ..utils.assert_valid_name import assert_valid_name
66

77

88
class DirectiveLocation(object):

graphql/type/introspection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
GraphQLInterfaceType, GraphQLList, GraphQLNonNull,
88
GraphQLObjectType, GraphQLScalarType,
99
GraphQLUnionType)
10-
from .scalars import GraphQLBoolean, GraphQLString
1110
from .directives import DirectiveLocation
12-
11+
from .scalars import GraphQLBoolean, GraphQLString
1312

1413
__Schema = GraphQLObjectType(
1514
'__Schema',

graphql/type/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def __init__(self, query, mutation=None, subscription=None, directives=None):
3838
self._query = query
3939
self._mutation = mutation
4040
self._subscription = subscription
41-
self._type_map = self._build_type_map()
42-
4341
if directives is None:
4442
directives = [
4543
GraphQLIncludeDirective,
@@ -52,7 +50,9 @@ def __init__(self, query, mutation=None, subscription=None, directives=None):
5250
)
5351

5452
self._directives = directives
53+
self._type_map = self._build_type_map()
5554

55+
# Enforce correct interface implementations.
5656
for type in self._type_map.values():
5757
if isinstance(type, GraphQLObjectType):
5858
for interface in type.get_interfaces():

graphql/utils/assert_valid_name.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import re
22

3-
43
NAME_PATTERN = r'^[_a-zA-Z][_a-zA-Z0-9]*$'
54
COMPILED_NAME_PATTERN = re.compile(NAME_PATTERN)
65

graphql/utils/build_client_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
GraphQLNonNull, GraphQLObjectType, GraphQLScalarType,
99
GraphQLSchema, GraphQLString, GraphQLUnionType,
1010
is_input_type, is_output_type)
11-
from ..type.directives import GraphQLDirective, DirectiveLocation
11+
from ..type.directives import DirectiveLocation, GraphQLDirective
1212
from ..type.introspection import TypeKind
1313
from .value_from_ast import value_from_ast
1414

0 commit comments

Comments
 (0)