Skip to content

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

Improve checkout query description (#13297)

Maciej Korycinskida174ddc1886
diff --git a/saleor/graphql/checkout/schema.py b/saleor/graphql/checkout/schema.py
index 55dbdce324..e87a0f706b 100644
--- a/saleor/graphql/checkout/schema.py
+++ b/saleor/graphql/checkout/schema.py
@@ -1,6 +1,6 @@
import graphene
-from ...permission.enums import CheckoutPermissions
+from ...permission.enums import AccountPermissions, CheckoutPermissions
from ..core import ResolveInfo
from ..core.connection import create_connection_slice, filter_connection_queryset
from ..core.descriptions import (
@@ -46,7 +46,12 @@ from .types import (
class CheckoutQueries(graphene.ObjectType):
checkout = BaseField(
Checkout,
- description="Look up a checkout by token and slug of channel.",
+ description=(
+ "Look up a checkout by id.\n\nRequires one of the following permissions to "
+ "query checkouts that belong to other users: "
+ f"{CheckoutPermissions.MANAGE_CHECKOUTS.name}, "
+ f"{AccountPermissions.IMPERSONATE_USER.name}. "
+ ),
id=graphene.Argument(
graphene.ID, description="The checkout's ID." + ADDED_IN_34
),
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index 15bc7a0db3..dce496e7f9 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -1221,7 +1221,11 @@ type Query {
"""List of all tax rates available from tax gateway."""
taxTypes: [TaxType!] @doc(category: "Taxes")
- """Look up a checkout by token and slug of channel."""
+ """
+ Look up a checkout by id.
+
+ Requires one of the following permissions to query checkouts that belong to other users: MANAGE_CHECKOUTS, IMPERSONATE_USER.
+ """
checkout(
"""
The checkout's ID.