|
| 1 | +"""The graphql_relay package""" |
| 2 | + |
| 3 | +# The graphql-relay and graphql-relay-js version info |
1 | 4 | from .version import version, version_info, version_js, version_info_js |
| 5 | + |
| 6 | +# Types for creating connection types in the schema |
2 | 7 | from .connection.connectiontypes import ( |
3 | | - Connection, ConnectionArguments, ConnectionCursor, Edge, PageInfo |
4 | | -) |
| 8 | + Connection, ConnectionArguments, ConnectionCursor, Edge, PageInfo) |
| 9 | + |
| 10 | +# Helpers for creating connection types in the schema |
5 | 11 | from .connection.connection import ( |
6 | 12 | backward_connection_args, connection_args, connection_definitions, |
7 | 13 | forward_connection_args, GraphQLConnectionDefinitions) |
| 14 | + |
| 15 | +# Helpers for creating connections from arrays |
8 | 16 | from .connection.arrayconnection import ( |
9 | 17 | connection_from_array, connection_from_array_slice, |
10 | 18 | cursor_for_object_in_connection, |
11 | 19 | cursor_to_offset, get_offset_with_default, offset_to_cursor) |
| 20 | + |
| 21 | +# Helper for creating mutations with client mutation IDs |
12 | 22 | from .mutation.mutation import mutation_with_client_mutation_id |
| 23 | + |
| 24 | +# Helper for creating node definitions |
| 25 | +from .node.node import node_definitions |
| 26 | + |
| 27 | +# Helper for creating plural identifying root fields |
| 28 | +from .node.plural import plural_identifying_root_field |
| 29 | + |
| 30 | +# Utilities for creating global IDs in systems that don't have them |
13 | 31 | from .node.node import ( |
14 | | - node_definitions, |
15 | 32 | from_global_id, global_id_field, to_global_id) |
16 | | -from .node.plural import plural_identifying_root_field |
| 33 | + |
| 34 | +# Deprecated functions from older graphql-relay-py versions |
| 35 | +# noinspection PyProtectedMember,PyUnresolvedReferences,PyDeprecation |
| 36 | +from .connection.arrayconnection import ( # noqa: F401 |
| 37 | + connection_from_list, connection_from_list_slice) |
17 | 38 |
|
18 | 39 | __version__ = version |
19 | 40 | __version_info__ = version_info |
20 | 41 | __version_js__ = version_js |
21 | 42 | __version_info_js__ = version_info_js |
22 | 43 |
|
23 | 44 | __all__ = [ |
24 | | - # The graphql-relay and graphql-relay-js version info |
25 | 45 | 'version', 'version_info', 'version_js', 'version_info_js', |
26 | | - # Types for creating connection types in the schema |
27 | 46 | 'Connection', 'ConnectionArguments', 'ConnectionCursor', 'Edge', 'PageInfo', |
28 | | - # Helpers for creating connection types in the schema |
29 | 47 | 'backward_connection_args', 'connection_args', 'connection_definitions', |
30 | 48 | 'forward_connection_args', 'GraphQLConnectionDefinitions', |
31 | | - # Helpers for creating connections from arrays |
32 | 49 | 'connection_from_array', 'connection_from_array_slice', |
33 | 50 | 'cursor_for_object_in_connection', 'cursor_to_offset', |
34 | 51 | 'get_offset_with_default', 'offset_to_cursor', |
35 | | - # Helper for creating mutations with client mutation IDs |
36 | 52 | 'mutation_with_client_mutation_id', |
37 | | - # Helper for creating node definitions |
38 | 53 | 'node_definitions', |
39 | | - # Helper for creating plural identifying root fields |
40 | 54 | 'plural_identifying_root_field', |
41 | | - # Utilities for creating global IDs in systems that don't have them |
42 | 55 | 'from_global_id', 'global_id_field', 'to_global_id', |
43 | 56 | ] |
0 commit comments