Skip to Content

articles

Search and paginate through blog articles

Authentication

Public Access: Accessible with the public API key

Query Structure

{ articles( first: Int after: String last: Int before: String query: String author: Int language: String tags: [String] sortKey: ArticleSortKey reverse: Boolean ) { # ArticleConnection fields } }

Arguments

ArgumentTypeRequiredDescription
firstIntNoReturns the first n elements.
afterStringNoReturns elements after cursor.
lastIntNoReturns the last n elements.
beforeStringNoReturns elements before cursor.
queryStringNoSearch query string to filter articles by content.
authorIntNoFilter articles by author ID.
languageStringNoFilter articles by language code (e.g., “en”, “fi”). Must be an available store language.
tags[String]NoFilter articles by tags.
sortKeyArticleSortKeyNoThe key to sort articles by.
reverseBooleanNoReverse the order of the underlying list.

Return Type

Returns ArticleConnection, which contains a paginated collection of articles with cursor-based navigation and edges.

Example

query { articles(first: 10, language: "en", sortKey: PUBLISHED_AT, reverse: true) { edges { node { id title content publishedAt author { name } } cursor } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }