|
46 | 46 |
|
47 | 47 | # Create and operate on GraphQL type definitions and schema. |
48 | 48 | from .type import ( |
49 | | - GraphQLSchema, |
50 | 49 | # Definitions |
| 50 | + GraphQLSchema, |
| 51 | + GraphQLDirective, |
51 | 52 | GraphQLScalarType, |
52 | 53 | GraphQLObjectType, |
53 | 54 | GraphQLInterfaceType, |
|
57 | 58 | GraphQLInputObjectType, |
58 | 59 | GraphQLList, |
59 | 60 | GraphQLNonNull, |
60 | | - GraphQLDirective, |
61 | | - # "Enum" of Type Kinds |
62 | | - TypeKind, |
63 | | - # Scalars |
| 61 | + # Standard GraphQL Scalars |
64 | 62 | specified_scalar_types, |
65 | 63 | GraphQLInt, |
66 | 64 | GraphQLFloat, |
|
72 | 70 | GraphQLIncludeDirective, |
73 | 71 | GraphQLSkipDirective, |
74 | 72 | GraphQLDeprecatedDirective, |
| 73 | + # "Enum" of Type Kinds |
| 74 | + TypeKind, |
75 | 75 | # Constant Deprecation Reason |
76 | 76 | DEFAULT_DEPRECATION_REASON, |
| 77 | + # GraphQL Types for introspection. |
| 78 | + introspection_types, |
77 | 79 | # Meta-field definitions. |
78 | 80 | SchemaMetaFieldDef, |
79 | 81 | TypeMetaFieldDef, |
80 | 82 | TypeNameMetaFieldDef, |
81 | | - # GraphQL Types for introspection. |
82 | | - introspection_types, |
83 | 83 | # Predicates |
84 | 84 | is_schema, |
85 | 85 | is_directive, |
|
167 | 167 | get_location, |
168 | 168 | # Lex |
169 | 169 | Lexer, |
| 170 | + TokenKind, |
170 | 171 | # Parse |
171 | 172 | parse, |
172 | 173 | parse_value, |
|
178 | 179 | ParallelVisitor, |
179 | 180 | TypeInfoVisitor, |
180 | 181 | Visitor, |
181 | | - TokenKind, |
182 | | - DirectiveLocation, |
183 | 182 | BREAK, |
184 | 183 | SKIP, |
185 | 184 | REMOVE, |
186 | 185 | IDLE, |
| 186 | + DirectiveLocation, |
187 | 187 | # Predicates |
188 | 188 | is_definition_node, |
189 | 189 | is_executable_definition_node, |
|
196 | 196 | is_type_extension_node, |
197 | 197 | # Types |
198 | 198 | SourceLocation, |
199 | | - # AST nodes |
200 | 199 | Location, |
201 | 200 | Token, |
| 201 | + # AST nodes |
| 202 | + Node, |
| 203 | + # Each kind of AST node |
202 | 204 | NameNode, |
203 | 205 | DocumentNode, |
204 | 206 | DefinitionNode, |
|
254 | 256 | InputObjectTypeExtensionNode, |
255 | 257 | ) |
256 | 258 |
|
257 | | -# Execute GraphQL queries. |
| 259 | +# Execute GraphQL documents. |
258 | 260 | from .execution import ( |
259 | 261 | execute, |
260 | 262 | default_field_resolver, |
|
341 | 343 | lexicographic_sort_schema, |
342 | 344 | # Print a GraphQLSchema to GraphQL Schema language. |
343 | 345 | print_schema, |
344 | | - # Prints the built-in introspection schema in the Schema Language format. |
345 | | - print_introspection_schema, |
346 | 346 | # Print a GraphQLType to GraphQL Schema language. |
347 | 347 | print_type, |
| 348 | + # Prints the built-in introspection schema in the Schema Language format. |
| 349 | + print_introspection_schema, |
348 | 350 | # Create a GraphQLType from a GraphQL language AST. |
349 | 351 | type_from_ast, |
350 | 352 | # Create a Python value from a GraphQL language AST with a Type. |
|
374 | 376 | # Determine if a string is a valid GraphQL name. |
375 | 377 | is_valid_name_error, |
376 | 378 | # Compare two GraphQLSchemas and detect breaking changes. |
377 | | - find_breaking_changes, |
378 | | - find_dangerous_changes, |
379 | 379 | BreakingChange, |
380 | 380 | BreakingChangeType, |
381 | 381 | DangerousChange, |
382 | 382 | DangerousChangeType, |
| 383 | + find_breaking_changes, |
| 384 | + find_dangerous_changes, |
383 | 385 | ) |
384 | 386 |
|
385 | 387 | __all__ = [ |
386 | 388 | "graphql", |
387 | 389 | "graphql_sync", |
388 | 390 | "GraphQLSchema", |
| 391 | + "GraphQLDirective", |
389 | 392 | "GraphQLScalarType", |
390 | 393 | "GraphQLObjectType", |
391 | 394 | "GraphQLInterfaceType", |
|
395 | 398 | "GraphQLInputObjectType", |
396 | 399 | "GraphQLList", |
397 | 400 | "GraphQLNonNull", |
398 | | - "GraphQLDirective", |
399 | | - "TypeKind", |
400 | 401 | "specified_scalar_types", |
401 | 402 | "GraphQLInt", |
402 | 403 | "GraphQLFloat", |
|
407 | 408 | "GraphQLIncludeDirective", |
408 | 409 | "GraphQLSkipDirective", |
409 | 410 | "GraphQLDeprecatedDirective", |
| 411 | + "TypeKind", |
410 | 412 | "DEFAULT_DEPRECATION_REASON", |
| 413 | + "introspection_types", |
411 | 414 | "SchemaMetaFieldDef", |
412 | 415 | "TypeMetaFieldDef", |
413 | 416 | "TypeNameMetaFieldDef", |
414 | | - "introspection_types", |
415 | 417 | "is_schema", |
416 | 418 | "is_directive", |
417 | 419 | "is_type", |
|
489 | 491 | "Source", |
490 | 492 | "get_location", |
491 | 493 | "Lexer", |
| 494 | + "TokenKind", |
492 | 495 | "parse", |
493 | 496 | "parse_value", |
494 | 497 | "parse_type", |
|
497 | 500 | "ParallelVisitor", |
498 | 501 | "TypeInfoVisitor", |
499 | 502 | "Visitor", |
500 | | - "TokenKind", |
501 | | - "DirectiveLocation", |
502 | 503 | "BREAK", |
503 | 504 | "SKIP", |
504 | 505 | "REMOVE", |
505 | 506 | "IDLE", |
| 507 | + "DirectiveLocation", |
506 | 508 | "is_definition_node", |
507 | 509 | "is_executable_definition_node", |
508 | 510 | "is_selection_node", |
|
515 | 517 | "SourceLocation", |
516 | 518 | "Location", |
517 | 519 | "Token", |
| 520 | + "Node", |
518 | 521 | "NameNode", |
519 | 522 | "DocumentNode", |
520 | 523 | "DefinitionNode", |
|
625 | 628 | "extend_schema", |
626 | 629 | "lexicographic_sort_schema", |
627 | 630 | "print_schema", |
628 | | - "print_introspection_schema", |
629 | 631 | "print_type", |
| 632 | + "print_introspection_schema", |
630 | 633 | "type_from_ast", |
631 | 634 | "value_from_ast", |
632 | 635 | "value_from_ast_untyped", |
|
0 commit comments