Mutation
mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
clientMutationId
errors
post {
answerCount
assets {
aspectRatio
assetStyle
contentType
fileSize
id
imageUrl
}
body
bodyHtml
bodyText
cheerCount
}
}
}Variables
{
"input": {
"spaceId": "id"
}
}Response
{
"data": {
"createPost": {
"clientMutationId": "string",
"errors": [
"string"
],
"post": {
"answerCount": 1,
"assets": [
{
"aspectRatio": 1.5,
"assetStyle": "string",
"contentType": "string",
"fileSize": "string",
"id": "id",
"imageUrl": "string"
}
],
"body": "string",
"bodyHtml": "string",
"bodyText": "string",
"cheerCount": 1
}
}
}
}Mutations
createPost
Create a new post or article in a space
Required scopes: write:posts, host:write:network_posts (any one)
MUTATION
createPost(input: CreatePostInput!): CreatePostPayloadArguments
input
required
Parameters for CreatePost
Returns
clientMutationId
String
A unique identifier for the client performing the mutation.
errors
[String!]!
post
Mutation
mutation CreatePost($input: CreatePostInput!) {
createPost(input: $input) {
clientMutationId
errors
post {
answerCount
assets {
aspectRatio
assetStyle
contentType
fileSize
id
imageUrl
}
body
bodyHtml
bodyText
cheerCount
}
}
}Variables
{
"input": {
"spaceId": "id"
}
}Response
{
"data": {
"createPost": {
"clientMutationId": "string",
"errors": [
"string"
],
"post": {
"answerCount": 1,
"assets": [
{
"aspectRatio": 1.5,
"assetStyle": "string",
"contentType": "string",
"fileSize": "string",
"id": "id",
"imageUrl": "string"
}
],
"body": "string",
"bodyHtml": "string",
"bodyText": "string",
"cheerCount": 1
}
}
}
}