diff --git a/backend/src/graphql/queries/createPostMutation.ts b/backend/src/graphql/queries/createPostMutation.ts index f0a01b303..2a285401e 100644 --- a/backend/src/graphql/queries/createPostMutation.ts +++ b/backend/src/graphql/queries/createPostMutation.ts @@ -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 diff --git a/backend/src/graphql/types/type/Post.gql b/backend/src/graphql/types/type/Post.gql index 0c654b86b..09f6fb8c9 100644 --- a/backend/src/graphql/types/type/Post.gql +++ b/backend/src/graphql/types/type/Post.gql @@ -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 diff --git a/webapp/graphql/PostMutations.js b/webapp/graphql/PostMutations.js index 862615e09..00954e11d 100644 --- a/webapp/graphql/PostMutations.js +++ b/webapp/graphql/PostMutations.js @@ -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