Skip to content
Available for new work
Pages in Blog

ReferencePremium

CoullWorks Blog for Magento 2 GraphQL schema reference

Every GraphQL query, mutation, argument, input, enum and type of the add-on, with field types and meaning.

Updated 16 November 2026Back to the package pageBuy

The GraphQL schema is provided by the paid GraphQL and REST add-on. Every query and mutation needs a licensed domain.

About the add-on#

  • GraphQL types: Types: Query, Mutation, inputs CwBlogPostFilterInput, CwBlogPostSortInput, CwBlogAddCommentInput; enum CwBlogPostSortField (PUBLISHED_AT, TITLE, READING_MINUTES, CREATED_AT); object types CwBlogPosts, CwBlogPost, CwBlogBlock, CwBlogFaq, CwBlogMeta, CwBlogKeyValue, CwBlogHreflang, CwBlogCategory, CwBlogTags, CwBlogTag, CwBlogAuthor, CwBlogAuthorLink, CwBlogComment, CwBlogAddCommentOutput. Reuses Magento SortEnum, SearchResultPageInfo and ProductInterface.
  • RATE_LIMITED error: A rate-limited comment fails with GraphQlInputException extensions.code RATE_LIMITED. Spam or captcha refusals return the generic storefront message. Unlicensed domain: authorisation error on every query/mutation.
  • CoullWorks Blog GraphQL & REST add-on: Separate paid module; requires coullworks/module-blog and Magento GraphQL, Catalog GraphQL, Store GraphQL, Customer, Webapi and Widget modules. No admin screen and no configuration of its own. Licence gate on every resolver (plugin GateResolvers) and REST route (plugin GateRoutes).

Queries and mutations#

cwBlogPosts#

Posts the reader can see, with filters, sort and paging. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Posts. Cache identity CoullWorks\BlogGraphQl\Model\Cache\PostsIdentity.

ArgumentTypeDefaultNotes
filterCwBlogPostFilterInputnoneOptional.
sortCwBlogPostSortInputnoneOptional.
pageSizeInt12Optional; default 12; page size must be 1..100 (Args::MAX_PAGE_SIZE).
currentPageInt1Optional; default 1.

cwBlogPost#

One post by url key or id. A draft, scheduled, disabled or other-store post is a no-such-entity error. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Post. Cache identity CoullWorks\BlogGraphQl\Model\Cache\SinglePostIdentity.

ArgumentTypeDefaultNotes
url_keyStringnoneOptional.
idIntnoneOptional.

cwBlogCategories#

Visible categories under parent_id, or the roots. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Categories. Cache identity CoullWorks\BlogGraphQl\Model\Cache\CategoriesIdentity.

ArgumentTypeDefaultNotes
parent_idIntnoneOptional.

cwBlogCategory#

One category by url key. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Category. Cache identity CoullWorks\BlogGraphQl\Model\Cache\CategoryIdentity.

ArgumentTypeDefaultNotes
url_keyString!noneRequired.

cwBlogTags#

Visible tags, paged. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Tags. Cache identity CoullWorks\BlogGraphQl\Model\Cache\TagsIdentity.

ArgumentTypeDefaultNotes
pageSizeInt50Optional; default 50; page size must be 1..100 (Args::MAX_PAGE_SIZE).
currentPageInt1Optional; default 1.

cwBlogTag#

One tag by url key. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Tag. Cache identity CoullWorks\BlogGraphQl\Model\Cache\TagIdentity.

ArgumentTypeDefaultNotes
url_keyString!noneRequired.

cwBlogAuthors#

Active authors. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Authors. Cache identity CoullWorks\BlogGraphQl\Model\Cache\AuthorsIdentity.

cwBlogAuthor#

One author by url key. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Author. Cache identity CoullWorks\BlogGraphQl\Model\Cache\AuthorIdentity.

ArgumentTypeDefaultNotes
url_keyString!noneRequired.

cwBlogSearch#

Articles matching a query. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Search. Cache identity CoullWorks\BlogGraphQl\Model\Cache\PostsIdentity.

ArgumentTypeDefaultNotes
queryString!noneRequired.
pageSizeInt12Optional; default 12; page size must be 1..100 (Args::MAX_PAGE_SIZE).
currentPageInt1Optional; default 1.

cwBlogComments#

Approved comments of a visible post. Resolver CoullWorks\BlogGraphQl\Model\Resolver\Comments. Cache identity CoullWorks\BlogGraphQl\Model\Cache\CommentsIdentity.

ArgumentTypeDefaultNotes
post_idInt!noneRequired.

cwBlogCommentToken#

The timing token to send as token in cwBlogAddComment, for a post the reader can see. Not cached. Resolver CoullWorks\BlogGraphQl\Model\Resolver\CommentToken. Not cached.

ArgumentTypeDefaultNotes
post_idInt!noneRequired.

cwBlogBlockSchema#

The structured block schema as JSON. Resolver CoullWorks\BlogGraphQl\Model\Resolver\BlockSchema. Not cached.

cwBlogAddComment#

Adds a comment as a guest or, with a customer token, as the customer. It follows the same rules as the storefront form. Resolver CoullWorks\BlogGraphQl\Model\Resolver\AddComment. Not cached.

ArgumentTypeDefaultNotes
inputCwBlogAddCommentInput!noneRequired.

Types#

CwBlogPostFilterInput (input)#

FieldTypeWhat it is
category_idIntPosts in this category.
tag_idIntPosts with this tag.
author_idIntPosts written or co-written by this author. Cannot be combined with search.
searchStringFull-text search; category_id and tag_id narrow it.

CwBlogPostSortInput (input)#

FieldTypeWhat it is
fieldCwBlogPostSortField = PUBLISHED_ATThe field to sort by. One of the CwBlogPostSortField values. Defaults to PUBLISHED_AT.
directionSortEnum = DESCSort direction, ASC or DESC. Defaults to DESC.

CwBlogPostSortField (enum)#

FieldTypeWhat it is
PUBLISHED_ATenum valueSort field of cwBlogPosts sort.field.
TITLEenum valueSort field of cwBlogPosts sort.field.
READING_MINUTESenum valueSort field of cwBlogPosts sort.field.
CREATED_ATenum valueSort field of cwBlogPosts sort.field.

CwBlogPosts (type)#

FieldTypeWhat it is
items[CwBlogPost!]!The posts on this page.
total_countInt!How many posts the reader can see for this query.
page_infoSearchResultPageInfoPaging information for the result (current page, page size and total pages).

CwBlogPost (type)#

FieldTypeWhat it is
idInt!The post id.
url_keyString!The post's URL key.
urlStringThe canonical address of the post. Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostSeo.
titleString!The post title.
short_contentStringThe short summary of the post.
featured_imageStringFull address of the featured image, empty when none.
featured_image_altStringAlternative text of the featured image.
published_atStringWhen the post was published.
updated_atStringWhen the post was last updated.
reading_minutesInt!Estimated reading time in minutes.
is_ai_assistedBoolean!Whether the post was written with the AI Writer.
show_ai_disclosureBooleanThe per-post override for showing the AI disclosure line. Null means the store setting applies.
comments_closedBooleanWhether comments are closed on this post. Null means the store default applies.
templateStringThe post template name.
content_htmlStringThe body with directives, media and widgets resolved, as the storefront prints it. Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostContent.
content_blocks[CwBlogBlock!]The body as structured blocks. Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostContent.
takeaways[String!]!The key takeaways of the post, as plain strings.
faqs[CwBlogFaq!]!The post's questions and answers.
categories[CwBlogCategory!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostRelations.
tags[CwBlogTag!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostRelations.
authorCwBlogAuthorResolver CoullWorks\BlogGraphQl\Model\Resolver\PostRelations.
coauthors[CwBlogAuthor!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostRelations.
related_posts[CwBlogPost!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostRelations.
related_products[ProductInterface]Products picked for the post that the reader's store and customer group may see. Resolver CoullWorks\BlogGraphQl\Model\Resolver\RelatedProducts.
metaCwBlogMetaResolver CoullWorks\BlogGraphQl\Model\Resolver\PostSeo.
json_ld[String!]!JSON-LD documents, one JSON string each, as in the storefront page head. Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostSeo.
hreflang[CwBlogHreflang!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\PostSeo.

CwBlogBlock (type)#

FieldTypeWhat it is
typeString!The block type code.
dataString!The block's data as a JSON string, shaped as cwBlogBlockSchema describes.
children[CwBlogBlock!]The blocks nested inside this block, when it holds any.

CwBlogFaq (type)#

FieldTypeWhat it is
questionString!The question.
answerString!The answer.

CwBlogMeta (type)#

FieldTypeWhat it is
titleString!The page title for search results.
descriptionString!The meta description.
robotsString!The robots directive of the page.
canonicalString!The canonical address of the page.
og[CwBlogKeyValue!]!The Open Graph tags as key and value pairs.
twitter[CwBlogKeyValue!]!The Twitter card tags as key and value pairs.
prevStringThe address of the previous page of a paged listing, when there is one.
nextStringThe address of the next page of a paged listing, when there is one.

CwBlogKeyValue (type)#

FieldTypeWhat it is
keyString!The tag name.
valueString!The tag value.

CwBlogHreflang (type)#

FieldTypeWhat it is
hreflangString!The language code of the alternate.
hrefString!The address of the alternate.

CwBlogCategory (type)#

FieldTypeWhat it is
idInt!The category id.
parent_idIntThe parent category id, null for a root category.
url_keyString!The category's URL key.
urlStringResolver CoullWorks\BlogGraphQl\Model\Resolver\EntityUrl.
titleString!The category title.
descriptionStringThe category description.
imageStringThe category image.
levelInt!How deep the category sits in the tree.
positionInt!The category's position among its siblings.
meta_titleStringThe category's meta title.
meta_descriptionStringThe category's meta description.
include_in_menuBoolean!Whether the category is included in menus.
children[CwBlogCategory!]!Resolver CoullWorks\BlogGraphQl\Model\Resolver\CategoryChildren.

CwBlogTags (type)#

FieldTypeWhat it is
items[CwBlogTag!]!The tags on this page.
total_countInt!How many tags there are.
page_infoSearchResultPageInfoPaging information for the result.

CwBlogTag (type)#

FieldTypeWhat it is
idInt!The tag id.
url_keyString!The tag's URL key.
urlStringResolver CoullWorks\BlogGraphQl\Model\Resolver\EntityUrl.
titleString!The tag title.
descriptionStringThe tag description.
meta_titleStringThe tag's meta title.
meta_descriptionStringThe tag's meta description.

CwBlogAuthor (type)#

FieldTypeWhat it is
idInt!The author id.
url_keyString!The author's URL key.
urlStringResolver CoullWorks\BlogGraphQl\Model\Resolver\EntityUrl.
nameString!The author's name.
job_titleStringThe author's job title.
bioStringThe author's biography.
avatarStringThe author's avatar image.
links[CwBlogAuthorLink!]!The author's profile links.
FieldTypeWhat it is
networkString!The network the link points to.
urlString!The address of the profile.

CwBlogComment (type)#

FieldTypeWhat it is
idInt!The comment id.
post_idInt!The id of the post the comment belongs to.
parent_idIntThe id of the comment this one replies to, null for a top-level comment.
author_nameString!The name the commenter gave.
contentString!The comment text.
created_atStringWhen the comment was made.
is_admin_replyBoolean!Whether a staff member wrote the comment as a reply.

CwBlogAddCommentInput (input)#

FieldTypeWhat it is
post_idInt!The id of the post to comment on.
nameStringThe commenter's name.
emailStringThe commenter's email address.
contentString!The comment text.
parent_idIntThe id of the comment being replied to.
notify_on_replyBooleanWhether to email the commenter when someone replies.
honeypotStringThe hidden spam-trap field. Leave it empty; a value marks the comment as spam.
tokenStringThe timing token issued when the comment form was opened.
captcha_responseStringThe reCAPTCHA response, when reCAPTCHA is enabled for blog comments.

CwBlogAddCommentOutput (type)#

FieldTypeWhat it is
statusString!approved or pending.
messageString!A message for the reader, for example that the comment awaits moderation.
comment_idIntThe id of the stored comment.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.