Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceQueries

Blog

Authenticated · x-tenant · Auth rules: @storeos/rbac-catalog 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(where: CommonFindDocumentDto!): Blogs

Authenticated · x-tenant · Auth rules: @storeos/rbac-catalog 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

where*

Returns

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

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

handle?String
image?
isActive?Boolean
tenant?String
title*String!
updatedAt?DateTime

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

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