mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Remove read-only attributes from posts mutations
For the comments, the fix is not that easy: They are still using `neo4j-graphql-js` in the resolvers. And that library needs the input params for the query builder. See: https://github.com/Human-Connection/Human-Connection/issues/1454
This commit is contained in:
parent
3eea20f7c4
commit
00454c874c
@ -17,7 +17,7 @@ let user
|
||||
let moderator
|
||||
let troll
|
||||
|
||||
let action = () => {
|
||||
const action = () => {
|
||||
return query({ query: graphqlQuery })
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
params = await fileUpload(params, { file: 'imageUpload', url: 'image' })
|
||||
const session = context.driver.session()
|
||||
|
||||
let updatePostCypher = `MATCH (post:Post {id: $params.id})
|
||||
let updatePostCypher = `MATCH (post:Post {id: $params.id})
|
||||
SET post = $params
|
||||
`
|
||||
|
||||
|
||||
@ -57,26 +57,18 @@ type Post {
|
||||
type Mutation {
|
||||
CreatePost(
|
||||
id: ID
|
||||
activityId: String
|
||||
objectId: String
|
||||
title: String!
|
||||
slug: String
|
||||
content: String!
|
||||
image: String
|
||||
imageUpload: Upload
|
||||
visibility: Visibility
|
||||
deleted: Boolean
|
||||
disabled: Boolean
|
||||
createdAt: String
|
||||
updatedAt: String
|
||||
language: String
|
||||
categoryIds: [ID]
|
||||
contentExcerpt: String
|
||||
): Post
|
||||
UpdatePost(
|
||||
id: ID!
|
||||
activityId: String
|
||||
objectId: String
|
||||
title: String!
|
||||
slug: String
|
||||
content: String!
|
||||
@ -84,10 +76,6 @@ type Mutation {
|
||||
image: String
|
||||
imageUpload: Upload
|
||||
visibility: Visibility
|
||||
deleted: Boolean
|
||||
disabled: Boolean
|
||||
createdAt: String
|
||||
updatedAt: String
|
||||
language: String
|
||||
categoryIds: [ID]
|
||||
): Post
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user