Skip to Content
StoreOSv0.27.1
Storefront GraphQL APIReferenceQueries

Blog

Requires a signed-in staff user. Needs the `Blogs` `read` permission. Send the `x-tenant` header (the gateway sets it from your API key).

QUERYblog(id: String!): StorefrontBlog

Requires a signed-in staff user. Needs the Blogs read permission. Send the x-tenant header (the gateway sets it from your API key).

Arguments

id*String!

Returns

  1. blog
_id*ID!
title*String!
content?String
image?
isActive?Boolean
author?
categories?[String!]
createdAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

updatedAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

handle*String!
Example Request
query Blog($id: String!) {  blog(id: $id) {    _id    title    content    image {      fileAssetId      provider      key      external      alt    }    isActive    author {      name      email      avatar {        fileAssetId        provider        key        external        alt      }      phoneNumber    }    categories    createdAt    updatedAt    handle  }}
Variables
{  "id": "string"}
Example Response
{  "data": {    "blog": {      "_id": "1",      "title": "string",      "content": "string",      "image": {        "fileAssetId": "1",        "provider": "CLOUDINARY",        "key": "string",        "external": "string",        "alt": "string"      },      "isActive": true,      "author": {        "name": "string",        "email": "string",        "avatar": {          "fileAssetId": "1",          "provider": "CLOUDINARY",          "key": "string",          "external": "string",          "alt": "string"        },        "phoneNumber": "string"      },      "categories": [        "string"      ],      "createdAt": "<DateTime>",      "updatedAt": "<DateTime>",      "handle": "string"    }  }}