Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix variable name

Marcin Gębala889da01416f5
diff --git a/saleor/graphql/core/connection.py b/saleor/graphql/core/connection.py
index 5b4710467f..7a1224513b 100644
--- a/saleor/graphql/core/connection.py
+++ b/saleor/graphql/core/connection.py
@@ -192,7 +192,7 @@ def connection_from_queryset_slice(
args: ConnectionArguments = None,
connection_type: Any = Connection,
edge_type: Any = Edge,
- page_info_type: Any = PageInfo,
+ pageinfo_type: Any = PageInfo,
) -> Connection:
"""Create a connection object from a QuerySet."""
args = args or {}
@@ -219,7 +219,7 @@ def connection_from_queryset_slice(
qs = qs[:end_margin]
edges, page_info = _get_edges_for_connection(edge_type, qs, args, sorting_fields)
- return connection_type(edges=edges, page_info=page_info_type(**page_info),)
+ return connection_type(edges=edges, page_info=pageinfo_type(**page_info),)
class NonNullConnection(Connection):
diff --git a/saleor/graphql/core/fields.py b/saleor/graphql/core/fields.py
index 8afc293823..e612d01d25 100644
--- a/saleor/graphql/core/fields.py
+++ b/saleor/graphql/core/fields.py
@@ -49,7 +49,7 @@ class BaseDjangoConnectionField(DjangoConnectionField):
common_args = {
"connection_type": connection,
"edge_type": connection.Edge,
- "page_info_type": PageInfo,
+ "pageinfo_type": PageInfo,
}
if isinstance(iterable, list):
common_args["args"] = args
@@ -163,7 +163,7 @@ class FilterInputConnectionField(PrefetchingConnectionField):
if enforce_first_or_last and not (first or last):
raise GraphQLError(
f"You must provide a `first` or `last` value to properly paginate "
- f"the {info.field_name} connection."
+ f"the `{info.field_name}` connection."
)
if max_limit: