Skip to Content

Blog

Represents a blog object, including its articles and related information.

Type Definition

type Blog { articles: [Article] recent: [Article]! lastUpdated: [Article] }

Fields

FieldTypeNullabilityDescriptionRelationship
articles[Article]OptionalList of all articles published in this blog.Related to Article type
recent[Article]Non-nullList of recently published articles in this blog.Related to Article type
lastUpdated[Article]OptionalList of recently updated articles in this blog.Related to Article type

Relationships

  • articles: Connects the Blog to multiple Article objects representing all articles published under this blog.
  • recent: Connects the Blog to multiple Article objects representing the most recently published articles. This field is always present (non-null).
  • lastUpdated: Connects the Blog to multiple Article objects representing articles that have been recently updated.

These relationships allow traversal from a blog to its articles, enabling retrieval of different subsets of articles based on publication or update recency.

Usage Examples

Basic Query

Fetch all recent articles in a blog:

{ blog(id: 101) { recent { id title publishedAt } } }

Field Selection

Retrieve all articles and recently updated articles with their titles and IDs:

{ blog(id: 101) { articles { id title } lastUpdated { id title } } }

Nested Queries

Fetch recent articles with nested blog information for each article:

{ blog(id: 101) { recent { id title blog { id articles { id title } } } } }

Filtering and Sorting

The Blog type itself does not expose filtering, sorting, or pagination arguments on its fields directly. To filter or sort articles, use queries on the Article type with appropriate arguments (not shown here as outside the scope of the Blog type fields).

Implements

The Blog type does not implement any interfaces.

Connections

The Blog type connects to the Article type via the fields:

  • articles
  • recent
  • lastUpdated

These connections provide access to lists of articles related to the blog.

  • Article: Represents individual articles associated with the blog. The articles, recent, and lastUpdated fields return lists of this type.

Best Practices

  • Use the recent field to efficiently fetch the latest published articles, as it is guaranteed to be non-null.
  • When displaying a blog’s content overview, consider combining articles and lastUpdated to show both all articles and recently updated content.
  • For performance, avoid querying large lists in articles without pagination (handled at the Article type level).
  • Use nested queries to traverse from articles back to their blog if contextual information is needed.

Notes

  • The API currently requires no authentication, but this may change in future versions.
  • The articles and lastUpdated fields are optional and may return null if no articles exist or updates are available.
  • No computed or derived fields are defined on the Blog type.
  • No field arguments are defined on the Blog fields.
  • To optimize performance, limit the number of articles requested in queries or use filtering and pagination on the Article type where supported.
Last updated on