|
25 | 25 |
|
26 | 26 | # The primary entry point into fulfilling a GraphQL request.
|
27 | 27 | from .graphql import (
|
28 |
| - graphql |
| 28 | + graphql |
29 | 29 | )
|
30 | 30 |
|
31 | 31 |
|
32 | 32 | # Create and operate on GraphQL type definitions and schema.
|
33 | 33 | from .type import ( # no import order
|
34 |
| - GraphQLSchema, |
35 |
| - |
36 |
| - # Definitions |
37 |
| - GraphQLScalarType, |
38 |
| - GraphQLObjectType, |
39 |
| - GraphQLInterfaceType, |
40 |
| - GraphQLUnionType, |
41 |
| - GraphQLEnumType, |
42 |
| - GraphQLInputObjectType, |
43 |
| - GraphQLList, |
44 |
| - GraphQLNonNull, |
45 |
| - |
46 |
| - # Scalars |
47 |
| - GraphQLInt, |
48 |
| - GraphQLFloat, |
49 |
| - GraphQLString, |
50 |
| - GraphQLBoolean, |
51 |
| - GraphQLID, |
52 |
| - |
53 |
| - # Predicates |
54 |
| - is_type, |
55 |
| - is_input_type, |
56 |
| - is_output_type, |
57 |
| - is_leaf_type, |
58 |
| - is_composite_type, |
59 |
| - is_abstract_type, |
60 |
| - |
61 |
| - # Un-modifiers |
62 |
| - get_nullable_type, |
63 |
| - get_named_type, |
| 34 | + GraphQLSchema, |
| 35 | + |
| 36 | + # Definitions |
| 37 | + GraphQLScalarType, |
| 38 | + GraphQLObjectType, |
| 39 | + GraphQLInterfaceType, |
| 40 | + GraphQLUnionType, |
| 41 | + GraphQLEnumType, |
| 42 | + GraphQLInputObjectType, |
| 43 | + GraphQLList, |
| 44 | + GraphQLNonNull, |
| 45 | + GraphQLField, |
| 46 | + GraphQLArgument, |
| 47 | + |
| 48 | + # Scalars |
| 49 | + GraphQLInt, |
| 50 | + GraphQLFloat, |
| 51 | + GraphQLString, |
| 52 | + GraphQLBoolean, |
| 53 | + GraphQLID, |
| 54 | + |
| 55 | + # Predicates |
| 56 | + is_type, |
| 57 | + is_input_type, |
| 58 | + is_output_type, |
| 59 | + is_leaf_type, |
| 60 | + is_composite_type, |
| 61 | + is_abstract_type, |
| 62 | + |
| 63 | + # Un-modifiers |
| 64 | + get_nullable_type, |
| 65 | + get_named_type, |
64 | 66 | )
|
65 | 67 |
|
66 | 68 |
|
67 | 69 | # Parse and operate on GraphQL language source files.
|
68 | 70 | from .language.base import ( # no import order
|
69 |
| - Source, |
70 |
| - get_location, |
| 71 | + Source, |
| 72 | + get_location, |
71 | 73 |
|
72 |
| - # Parse |
73 |
| - parse, |
74 |
| - parse_value, |
| 74 | + # Parse |
| 75 | + parse, |
| 76 | + parse_value, |
75 | 77 |
|
76 |
| - # Print |
77 |
| - print_ast, |
| 78 | + # Print |
| 79 | + print_ast, |
78 | 80 |
|
79 |
| - # Visit |
80 |
| - visit, |
81 |
| - ParallelVisitor, |
82 |
| - TypeInfoVisitor, |
83 |
| - BREAK, |
| 81 | + # Visit |
| 82 | + visit, |
| 83 | + ParallelVisitor, |
| 84 | + TypeInfoVisitor, |
| 85 | + BREAK, |
84 | 86 | )
|
85 | 87 |
|
86 | 88 |
|
87 | 89 | # Execute GraphQL queries.
|
88 | 90 | from .execution import ( # no import order
|
89 |
| - execute, |
| 91 | + execute, |
90 | 92 | )
|
91 | 93 |
|
92 | 94 |
|
93 | 95 | # Validate GraphQL queries.
|
94 | 96 | from .validation import ( # no import order
|
95 |
| - validate, |
96 |
| - specified_rules, |
| 97 | + validate, |
| 98 | + specified_rules, |
97 | 99 | )
|
98 | 100 |
|
99 | 101 | # Create and format GraphQL errors.
|
100 | 102 | from .error import (
|
101 |
| - GraphQLError, |
102 |
| - format_error, |
| 103 | + GraphQLError, |
| 104 | + format_error, |
103 | 105 | )
|
104 | 106 |
|
105 | 107 |
|
106 | 108 | # Utilities for operating on GraphQL type schema and parsed sources.
|
107 | 109 | from .utils.base import (
|
108 |
| - # The GraphQL query recommended for a full schema introspection. |
109 |
| - introspection_query, |
| 110 | + # The GraphQL query recommended for a full schema introspection. |
| 111 | + introspection_query, |
110 | 112 |
|
111 |
| - # Gets the target Operation from a Document |
112 |
| - get_operation_ast, |
| 113 | + # Gets the target Operation from a Document |
| 114 | + get_operation_ast, |
113 | 115 |
|
114 |
| - # Build a GraphQLSchema from an introspection result. |
115 |
| - build_client_schema, |
| 116 | + # Build a GraphQLSchema from an introspection result. |
| 117 | + build_client_schema, |
116 | 118 |
|
117 |
| - # Build a GraphQLSchema from a parsed GraphQL Schema language AST. |
118 |
| - build_ast_schema, |
| 119 | + # Build a GraphQLSchema from a parsed GraphQL Schema language AST. |
| 120 | + build_ast_schema, |
119 | 121 |
|
120 |
| - # Extends an existing GraphQLSchema from a parsed GraphQL Schema |
121 |
| - # language AST. |
122 |
| - extend_schema, |
| 122 | + # Extends an existing GraphQLSchema from a parsed GraphQL Schema |
| 123 | + # language AST. |
| 124 | + extend_schema, |
123 | 125 |
|
124 |
| - # Print a GraphQLSchema to GraphQL Schema language. |
125 |
| - print_schema, |
| 126 | + # Print a GraphQLSchema to GraphQL Schema language. |
| 127 | + print_schema, |
126 | 128 |
|
127 |
| - # Create a GraphQLType from a GraphQL language AST. |
128 |
| - type_from_ast, |
| 129 | + # Create a GraphQLType from a GraphQL language AST. |
| 130 | + type_from_ast, |
129 | 131 |
|
130 |
| - # Create a JavaScript value from a GraphQL language AST. |
131 |
| - value_from_ast, |
| 132 | + # Create a JavaScript value from a GraphQL language AST. |
| 133 | + value_from_ast, |
132 | 134 |
|
133 |
| - # Create a GraphQL language AST from a JavaScript value. |
134 |
| - ast_from_value, |
| 135 | + # Create a GraphQL language AST from a JavaScript value. |
| 136 | + ast_from_value, |
135 | 137 |
|
136 |
| - # A helper to use within recursive-descent visitors which need to be aware of |
137 |
| - # the GraphQL type system. |
138 |
| - TypeInfo, |
| 138 | + # A helper to use within recursive-descent visitors which need to be aware of |
| 139 | + # the GraphQL type system. |
| 140 | + TypeInfo, |
139 | 141 |
|
140 |
| - # Determine if JavaScript values adhere to a GraphQL type. |
141 |
| - is_valid_value, |
| 142 | + # Determine if JavaScript values adhere to a GraphQL type. |
| 143 | + is_valid_value, |
142 | 144 |
|
143 |
| - # Determine if AST values adhere to a GraphQL type. |
144 |
| - is_valid_literal_value, |
| 145 | + # Determine if AST values adhere to a GraphQL type. |
| 146 | + is_valid_literal_value, |
145 | 147 |
|
146 |
| - # Concatenates multiple AST together. |
147 |
| - concat_ast, |
| 148 | + # Concatenates multiple AST together. |
| 149 | + concat_ast, |
148 | 150 |
|
149 |
| - # Comparators for types |
150 |
| - is_equal_type, |
151 |
| - is_type_sub_type_of, |
152 |
| - do_types_overlap, |
| 151 | + # Comparators for types |
| 152 | + is_equal_type, |
| 153 | + is_type_sub_type_of, |
| 154 | + do_types_overlap, |
153 | 155 |
|
154 |
| - # Asserts a string is a valid GraphQL name. |
155 |
| - assert_valid_name, |
| 156 | + # Asserts a string is a valid GraphQL name. |
| 157 | + assert_valid_name, |
156 | 158 | )
|
157 | 159 |
|
158 | 160 | __all__ = (
|
|
166 | 168 | 'GraphQLInterfaceType',
|
167 | 169 | 'GraphQLList',
|
168 | 170 | 'GraphQLNonNull',
|
| 171 | + 'GraphQLField', |
| 172 | + 'GraphQLArgument', |
169 | 173 | 'GraphQLObjectType',
|
170 | 174 | 'GraphQLScalarType',
|
171 | 175 | 'GraphQLSchema',
|
|
0 commit comments