Add file uploads to create post mutation

This commit is contained in:
Maximilian Harz 2025-05-29 19:24:43 +02:00
parent 2c7c05e63b
commit 5f29969acb
3 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ export const createPostMutation = () => {
$title: String!
$slug: String
$content: String!
$filesToUpload: [FileInput]
$categoryIds: [ID]
$groupId: ID
$postType: PostType
@ -17,6 +18,7 @@ export const createPostMutation = () => {
title: $title
slug: $slug
content: $content
$filesToUpload: $filesToUpload
categoryIds: $categoryIds
groupId: $groupId
postType: $postType

View File

@ -173,7 +173,7 @@ type Post {
@cypher(
statement: "MATCH (this)<-[:VIEWED_TEASER]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1"
)
emotions: [EMOTED]
emotionsCount: Int!
@cypher(statement: "MATCH (this)<-[emoted:EMOTED]-(:User) RETURN COUNT(DISTINCT emoted)")
@ -195,7 +195,7 @@ type Post {
statement: "MATCH (this)<-[obs:OBSERVES]-(u:User {id: $cypherParams.currentUserId}) WHERE obs.active = true RETURN COUNT(u) >= 1"
)
observingUsersCount: Int!
@cypher(statement: "MATCH (this)<-[obs:OBSERVES]-(u:User) WHERE obs.active = true AND NOT u.deleted = true AND NOT u.disabled = true RETURN COUNT(DISTINCT u)")
@cypher(statement: "MATCH (this)<-[obs:OBSERVES]-(u:User) WHERE obs.active = true AND NOT u.deleted = true AND NOT u.disabled = true RETURN COUNT(DISTINCT u)")
}
input _PostInput {
@ -216,6 +216,7 @@ type Mutation {
title: String!
slug: String
content: String!
filesToUpload: [FileInput]
image: ImageInput,
visibility: Visibility
language: String

View File

@ -8,6 +8,7 @@ export default () => {
$title: String!
$slug: String
$content: String!
$filesToUpload: [FileInput]
$categoryIds: [ID]
$image: ImageInput
$groupId: ID
@ -19,6 +20,7 @@ export default () => {
title: $title
slug: $slug
content: $content
filesToUpload: $filesToUpload
categoryIds: $categoryIds
image: $image
groupId: $groupId