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:
roschaefer 2019-09-03 18:56:03 +02:00
parent 3eea20f7c4
commit 00454c874c
3 changed files with 2 additions and 14 deletions

View File

@ -17,7 +17,7 @@ let user
let moderator
let troll
let action = () => {
const action = () => {
return query({ query: graphqlQuery })
}

View File

@ -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
`

View File

@ -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