Type | Added | Removed | Modified |
|---|---|---|---|
Queries | 2 ( | 0 | 0 |
Mutations | 0 | 0 | 0 |
Object types | 3 ( | 0 | 0 |
Input types | 3 ( | 0 | 0 |
Enums | 2 ( | 0 | 0 |
None. No fields were removed from any object, query, or mutation in this branch.
blogPostsAdded in: app/graphql/queries/blog_post.rb, resolver in app/graphql/queries/query_methods/blog_post.rb
Description: Returns a paginated list of published blog posts, powered by Elasticsearch (BlogPost.list → Searchables#query_hash). The status: published term filter is applied unconditionally, so drafts and archived posts are never returned. Created to expose blog content to the public-facing website (YOP), whose URL is surfaced via websiteUrl.
Arguments:
Argument | Type | Required | Notes |
|---|---|---|---|
|
| No | See input types below |
|
| No |
|
BlogPostFilter input fields:
Field | Type | Behaviour |
|---|---|---|
|
| Full-text |
|
| Match specific post IDs |
|
| Match posts belonging to these category IDs |
|
| Match posts by slug(s) |
|
| Filter on the featured flag |
|
| One of |
|
|
|
Returns: BlogPostList — { data: [BlogPost], paging: Paging }
Example:
query {
blogPosts(
filters: {
q: "leadership"
ids: ["1", "2"]
blogCategoryIds: ["10", "11"]
slugs: ["my-first-post"]
isFeatured: true
sort: published_at
sortDirection: desc
}
pagination: { page: 1, perPage: 10 }
) {
data {
id
title
slug
description
content
status
isFeatured
websiteUrl
publishedAt
archivedAt
createdAt
updatedAt
blogCategory {
id
name
slug
}
person {
id
fullName
}
featuredImage(size: "500x500") {
id
filename
filesize
url
}
}
paging {
totalItems
totalPages
currentPage
}
}
}
blogCategoriesAdded in: app/graphql/queries/blog_category.rb, resolver in app/graphql/queries/query_methods/blog_category.rb
Description: Returns all blog categories as a plain (non-paginated) list, ordered by name ASC, with an optional case-insensitive ILIKE name search. Created to support category browsing/filtering for blog content.
Arguments:
Argument | Type | Required | Notes |
|---|---|---|---|
|
| No | Only contains |
Returns: [BlogCategory] (array, no data/paging wrapper)
Example:
query {
blogCategories(filters: { q: "tech" }) {
id
name
slug
color {
id
name
typeName
}
createdAt
updatedAt
}
}
None added, removed, or modified. Blog post/category writes are managed through cm-admin (app/models/concerns/cm_admin/), not the GraphQL API.
BlogPost (app/graphql/types/objects/blog_post.rb)Field | Type | Notes |
|---|---|---|
|
| |
|
| |
|
| Auto-generated from title ( |
|
| |
|
| Backed by ActionText rich text |
|
|
|
|
| Only one published post can be featured at a time |
|
| |
|
| Author; defaults to |
|
|
|
|
|
|
|
| |
|
| |
|
| |
|
|
BlogCategory (app/graphql/types/objects/blog_category.rb)Field | Type | Notes |
|---|---|---|
|
| |
|
| |
|
| Auto-generated from name |
|
| Optional color constant ( |
|
| |
|
|
BlogPostList (app/graphql/types/objects/blog_post_list.rb)Field | Type | Notes |
|---|---|---|
|
| List of blog posts |
|
| Pagination metadata |
Pagingnote: the sharedTypes::Objects::Pagingobject exposescurrentPage,totalItems, andtotalPages(nottotalCount).
BlogPostFilter (app/graphql/inputs/blog_post_filter.rb)Extends Helpers::BlogPostSortOption (which extends Helpers::BaseFilter).
Field | Type | Notes |
|---|---|---|
|
| Inherited from |
|
| Inherited from |
|
|
|
|
| |
|
| |
|
| |
|
|
BlogCategoryFilter (app/graphql/inputs/blog_category_filter.rb)Extends Helpers::BaseFilter — exposes only q: String.
Helpers::BlogPostSortOption (app/graphql/helpers/blog_post_sort_option.rb)Internal input base class providing sort + sortDirection arguments.
BlogPostStatus (app/graphql/types/enums/blog_post_status.rb)Values generated from BlogPost.statuses:
draftpublishedarchivedBlogPostSortOption (app/graphql/types/enums/blog_post_sort_option.rb)Extends BaseSortOption (inherits created_at, updated_at):
created_atupdated_attitle — sorts on title.keyword in Elasticsearchpublished_atapp/graphql/types/query_type.rb now implements the two new query interfaces:
implements Queries::BlogCategory
implements Queries::BlogPost