commerce_agent_knowledge_write
Arguments
ID!
required
The article’s
id.required
Fields to change.
Show fields
Show fields
String
The article body as authored.
[ID!]
Replaces the cited knowledge articles. Send an empty list to clear them.
[ID!]
Replaces the cited product families. Send an empty list to clear them.
Retrieval status.
String
The merchant-facing title of the article.
Returns
A Commerce Agent knowledge article the merchant authored or imported. Retrieval eligibility lives on
status and the effective window, not on the body.Show fields
Show fields
String!
required
The article body as authored.
ID!
required
The id of this knowledge article.
required
How this article was created. Immutable after create.
required
Product families this article cites.Requires:
products_readShow fields
Show fields
ArgumentsFields
String
Forward pagination cursor — returns items after it. Pass an
edges[].cursor or pageInfo.endCursor from a previous page.String
Backward pagination cursor — returns items before it. Pass an
edges[].cursor or pageInfo.startCursor from a previous page.Int
Forward pagination: returns the first N items (max 100, default 25). Use with
after; mutually exclusive with last/before.Int
Backward pagination: returns the last N items (max 100, default 25). Use with
before; mutually exclusive with first/after.required
The list of edges (each a node plus its pagination
cursor).Show fields
Show fields
String!
required
Opaque cursor for this item; pass to
after/before to page from here.required
The item at this edge.
required
The nodes in this page, without the edge/cursor wrapper — a convenience over
edges.Show fields
Show fields
Look up a single attribute on this family by its name, if set.Requires:
products_readShow fields
Show fields
Arguments
String!
required
The machine name of the attribute to look up.
required
The merchant-defined attributes set on this family.
String!
required
The product family’s long-form description.
ID!
required
The id of this product family.
The first (default) image for this family, if any.Requires:
products_readrequired
A paginated list of the family’s images.Requires:
products_readShow fields
Show fields
Arguments
String
Forward pagination cursor — returns items after it. Pass an
edges[].cursor or pageInfo.endCursor from a previous page.String
Backward pagination cursor — returns items before it. Pass an
edges[].cursor or pageInfo.startCursor from a previous page.Int
Forward pagination: returns the first N items (max 100, default 25). Use with
after; mutually exclusive with last/before.Int
Backward pagination: returns the last N items (max 100, default 25). Use with
before; mutually exclusive with first/after.required
The variant options (e.g. Size, Color) for this family.
required
A paginated list of the products (variants) in this family.Requires:
products_readShow fields
Show fields
Arguments
String
Forward pagination cursor — returns items after it. Pass an
edges[].cursor or pageInfo.endCursor from a previous page.String
Backward pagination cursor — returns items before it. Pass an
edges[].cursor or pageInfo.startCursor from a previous page.Int
Forward pagination: returns the first N items (max 100, default 25). Use with
after; mutually exclusive with last/before.Int
Backward pagination: returns the last N items (max 100, default 25). Use with
before; mutually exclusive with first/after.[String!]!
required
Free-form tags applied to the product family.
String!
required
The product family’s title.
String
The vendor or manufacturer of the product family.
Pagination metadata for the current page.
Show fields
Show fields
String
Cursor of the last edge in this page; pass to
after to page forward.Boolean!
required
Whether more items exist after this page (drives forward pagination with
first/after).Boolean!
required
Whether more items exist before this page (drives backward pagination with
last/before).String
Cursor of the first edge in this page; pass to
before to page backward.required
Other knowledge articles this article cites.Requires:
commerce_agent_knowledge_readShow fields
Show fields
ArgumentsFields
String
Forward pagination cursor — returns items after it. Pass an
edges[].cursor or pageInfo.endCursor from a previous page.String
Backward pagination cursor — returns items before it. Pass an
edges[].cursor or pageInfo.startCursor from a previous page.Int
Forward pagination: returns the first N items (max 100, default 25). Use with
after; mutually exclusive with last/before.Int
Backward pagination: returns the last N items (max 100, default 25). Use with
before; mutually exclusive with first/after.required
The list of edges (each a node plus its pagination
cursor).Show fields
Show fields
String!
required
Opaque cursor for this item; pass to
after/before to page from here.required
The item at this edge.
required
The nodes in this page, without the edge/cursor wrapper — a convenience over
edges.Pagination metadata for the current page.
Show fields
Show fields
String
Cursor of the last edge in this page; pass to
after to page forward.Boolean!
required
Whether more items exist after this page (drives forward pagination with
first/after).Boolean!
required
Whether more items exist before this page (drives backward pagination with
last/before).String
Cursor of the first edge in this page; pass to
before to page backward.required
Whether Commerce Agent may retrieve this article. Combine with the effective window.
String!
required
The merchant-facing title of the article.
Example
mutation {
updateKnowledgeArticle(id: "...", input: { ... }) {
content
createdAt
effectiveEndAt
effectiveStartAt
id
origin
productFamilies {
nodes {
createdAt
description
id
tags
title
updatedAt
vendor
}
pageInfo { hasNextPage endCursor }
}
referencedArticles {
nodes {
content
createdAt
effectiveEndAt
effectiveStartAt
id
origin
status
title
# ...
}
pageInfo { hasNextPage endCursor }
}
# ...
}
}