Debian Codegraph @

src/graphql/utilities/__init__.py

raw
1 """GraphQL Utilities
2
3 The :mod:`graphql.utilities` package contains common useful computations to use with
4 the GraphQL language and type objects.
5 """
6
7 # Produce the GraphQL query recommended for a full schema introspection.
8 from .get_introspection_query import get_introspection_query, IntrospectionQuery
9
10 # Get the target Operation from a Document.
11 from .get_operation_ast import get_operation_ast
12
13 # Get the Type for the target Operation AST.
14 from .get_operation_root_type import get_operation_root_type
15
16 # Convert a GraphQLSchema to an IntrospectionQuery.
17 from .introspection_from_schema import introspection_from_schema
18
19 # Build a GraphQLSchema from an introspection result.
20 from .build_client_schema import build_client_schema
21
22 # Build a GraphQLSchema from GraphQL Schema language.
23 from .build_ast_schema import build_ast_schema, build_schema
24
25 # Extend an existing GraphQLSchema from a parsed GraphQL Schema language AST.
26 from .extend_schema import extend_schema
27
28 # Sort a GraphQLSchema.
29 from .lexicographic_sort_schema import lexicographic_sort_schema
30
31 # Print a GraphQLSchema to GraphQL Schema language.
32 from .print_schema import (
33 print_introspection_schema,
34 print_schema,
35 print_type,
36 print_value, # deprecated
37 )
38
39 # Create a GraphQLType from a GraphQL language AST.
40 from .type_from_ast import type_from_ast
41
42 # Convert a language AST to a dictionary.
43 from .ast_to_dict import ast_to_dict
44
45 # Create a Python value from a GraphQL language AST with a type.
46 from .value_from_ast import value_from_ast
47
48 # Create a Python value from a GraphQL language AST without a type.
49 from .value_from_ast_untyped import value_from_ast_untyped
50
51 # Create a GraphQL language AST from a Python value.
52 from .ast_from_value import ast_from_value
53
54 # A helper to use within recursive-descent visitors which need to be aware of
55 # the GraphQL type system
56 from .type_info import TypeInfo, TypeInfoVisitor
57
58 # Coerce a Python value to a GraphQL type, or produce errors.
59 from .coerce_input_value import coerce_input_value
60
61 # Concatenate multiple ASTs together.
62 from .concat_ast import concat_ast
63
64 # Separate an AST into an AST per Operation.
65 from .separate_operations import separate_operations
66
67 # Strip characters that are not significant to the validity or execution
68 # of a GraphQL document.
69 from .strip_ignored_characters import strip_ignored_characters
70
71 # Comparators for types
72 from .type_comparators import is_equal_type, is_type_sub_type_of, do_types_overlap
73
74 # Assert that a string is a valid GraphQL name.
75 from .assert_valid_name import assert_valid_name, is_valid_name_error
76
77 # Compare two GraphQLSchemas and detect breaking changes.
78 from .find_breaking_changes import (
79 BreakingChange,
80 BreakingChangeType,
81 DangerousChange,
82 DangerousChangeType,
83 find_breaking_changes,
84 find_dangerous_changes,
85 )
86
87 # Resolve a schema coordinate to a schema element.
88 from .resolve_schema_coordinate import (
89 resolve_schema_coordinate,
90 resolve_ast_schema_coordinate,
91 ResolvedNamedType,
92 ResolvedField,
93 ResolvedInputField,
94 ResolvedEnumValue,
95 ResolvedFieldArgument,
96 ResolvedDirective,
97 ResolvedDirectiveArgument,
98 ResolvedSchemaElement,
99 )
100
101 __all__ = [
102 "BreakingChange",
103 "BreakingChangeType",
104 "DangerousChange",
105 "DangerousChangeType",
106 "IntrospectionQuery",
107 "ResolvedNamedType",
108 "ResolvedField",
109 "ResolvedInputField",
110 "ResolvedEnumValue",
111 "ResolvedFieldArgument",
112 "ResolvedDirective",
113 "ResolvedDirectiveArgument",
114 "ResolvedSchemaElement",
115 "resolve_schema_coordinate",
116 "resolve_ast_schema_coordinate",
117 "TypeInfo",
118 "TypeInfoVisitor",
119 "assert_valid_name",
120 "ast_from_value",
121 "ast_to_dict",
122 "build_ast_schema",
123 "build_client_schema",
124 "build_schema",
125 "coerce_input_value",
126 "concat_ast",
127 "do_types_overlap",
128 "extend_schema",
129 "find_breaking_changes",
130 "find_dangerous_changes",
131 "get_introspection_query",
132 "get_operation_ast",
133 "get_operation_root_type",
134 "is_equal_type",
135 "is_type_sub_type_of",
136 "is_valid_name_error",
137 "introspection_from_schema",
138 "lexicographic_sort_schema",
139 "print_introspection_schema",
140 "print_schema",
141 "print_type",
142 "print_value",
143 "separate_operations",
144 "strip_ignored_characters",
145 "type_from_ast",
146 "value_from_ast",
147 "value_from_ast_untyped",
148 ]