mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
67 lines
1.3 KiB
JavaScript
67 lines
1.3 KiB
JavaScript
import gql from 'graphql-tag'
|
|
|
|
export default () => {
|
|
return {
|
|
CreatePost: gql`
|
|
mutation(
|
|
$title: String!
|
|
$content: String!
|
|
$language: String
|
|
$categoryIds: [ID]
|
|
$imageUpload: Upload
|
|
) {
|
|
CreatePost(
|
|
title: $title
|
|
content: $content
|
|
language: $language
|
|
categoryIds: $categoryIds
|
|
imageUpload: $imageUpload
|
|
) {
|
|
title
|
|
slug
|
|
content
|
|
contentExcerpt
|
|
language
|
|
image
|
|
}
|
|
}
|
|
`,
|
|
UpdatePost: gql`
|
|
mutation(
|
|
$id: ID!
|
|
$title: String!
|
|
$content: String!
|
|
$language: String
|
|
$imageUpload: Upload
|
|
$categoryIds: [ID]
|
|
$image: String
|
|
) {
|
|
UpdatePost(
|
|
id: $id
|
|
title: $title
|
|
content: $content
|
|
language: $language
|
|
imageUpload: $imageUpload
|
|
categoryIds: $categoryIds
|
|
image: $image
|
|
) {
|
|
id
|
|
title
|
|
slug
|
|
content
|
|
contentExcerpt
|
|
language
|
|
image
|
|
}
|
|
}
|
|
`,
|
|
DeletePost: gql`
|
|
mutation($id: ID!) {
|
|
DeletePost(id: $id) {
|
|
id
|
|
}
|
|
}
|
|
`,
|
|
}
|
|
}
|