Skip to content

Commit f97a3ce

Browse files
authored
Re-add deprecated module 'arrayconnection' for backwards compatibility (#45)
1 parent 81f9d05 commit f97a3ce

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: src/graphql_relay/connection/arrayconnection.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import warnings
2+
3+
from .array_connection import (
4+
connection_from_array,
5+
connection_from_array_slice,
6+
cursor_for_object_in_connection,
7+
cursor_to_offset,
8+
get_offset_with_default,
9+
offset_to_cursor,
10+
)
11+
12+
13+
warnings.warn(
14+
"The 'arrayconnection' module is deprecated. "
15+
"Functions should be imported from the top-level package instead.",
16+
DeprecationWarning,
17+
stacklevel=2,
18+
)
19+
20+
21+
__all__ = [
22+
"connection_from_array",
23+
"connection_from_array_slice",
24+
"cursor_for_object_in_connection",
25+
"cursor_to_offset",
26+
"get_offset_with_default",
27+
"offset_to_cursor",
28+
]

0 commit comments

Comments
 (0)