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).
QUERY
blog(id: String!): StorefrontBlogRequires 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
- blog
_id*ID!title*String!content?Stringimage?isActive?Booleanauthor?categories?[String!]createdAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
updatedAt?DateTimeA 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 }}{ "id": "string"}{ "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" } }}