1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
Utilities
=========
.. currentmodule:: graphql.utilities
.. automodule:: graphql.utilities
:no-members:
:no-inherited-members:
The GraphQL query recommended for a full schema introspection:
.. autofunction:: get_introspection_query
.. autoclass:: IntrospectionQuery
:no-inherited-members:
Get the target Operation from a Document:
.. autofunction:: get_operation_ast
Get the Type for the target Operation AST:
.. autofunction:: get_operation_root_type
Convert a GraphQLSchema to an IntrospectionQuery:
.. autofunction:: introspection_from_schema
Build a GraphQLSchema from an introspection result:
.. autofunction:: build_client_schema
Build a GraphQLSchema from GraphQL Schema language:
.. autofunction:: build_ast_schema
.. autofunction:: build_schema
Extend an existing GraphQLSchema from a parsed GraphQL Schema language AST:
.. autofunction:: extend_schema
Sort a GraphQLSchema:
.. autofunction:: lexicographic_sort_schema
Print a GraphQLSchema to GraphQL Schema language:
.. autofunction:: print_introspection_schema
.. autofunction:: print_schema
.. autofunction:: print_type
Create a GraphQLType from a GraphQL language AST:
.. autofunction:: type_from_ast
Convert a language AST to a dictionary:
.. autofunction:: ast_to_dict
Create a Python value from a GraphQL language AST with a type:
.. autofunction:: value_from_ast
Create a Python value from a GraphQL language AST without a type:
.. autofunction:: value_from_ast_untyped
Create a GraphQL language AST from a Python value:
.. autofunction:: ast_from_value
A helper to use within recursive-descent visitors which need to be aware of the GraphQL
type system:
.. autoclass:: TypeInfo
.. autoclass:: TypeInfoVisitor
Coerce a Python value to a GraphQL type, or produce errors:
.. autofunction:: coerce_input_value
Concatenate multiple ASTs together:
.. autofunction:: concat_ast
Separate an AST into an AST per Operation:
.. autofunction:: separate_operations
Strip characters that are not significant to the validity or execution
of a GraphQL document:
.. autofunction:: strip_ignored_characters
Comparators for types:
.. autofunction:: is_equal_type
.. autofunction:: is_type_sub_type_of
.. autofunction:: do_types_overlap
Assert that a string is a valid GraphQL name:
.. autofunction:: assert_valid_name
.. autofunction:: is_valid_name_error
Compare two GraphQLSchemas and detect breaking changes:
.. autofunction:: find_breaking_changes
.. autofunction:: find_dangerous_changes
.. autoclass:: BreakingChange
.. autoclass:: BreakingChangeType
.. autoclass:: DangerousChange
.. autoclass:: DangerousChangeType
|