add group to post in schema

This commit is contained in:
Moriz Wahl 2022-09-20 18:53:00 +02:00
parent 6f59ced9eb
commit 90e1696f86
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,8 @@ type Group {
categories: [Category] @relation(name: "CATEGORIZED", direction: "OUT")
myRole: GroupMemberRole # if 'null' then the current user is no member
posts: [Post] @relation(name: "IN", direction: "IN")
}

View File

@ -81,6 +81,7 @@ input _PostFilter {
emotions_none: _PostEMOTEDFilter
emotions_single: _PostEMOTEDFilter
emotions_every: _PostEMOTEDFilter
group: ID
}
enum _PostOrdering {
@ -167,6 +168,8 @@ type Post {
emotions: [EMOTED]
emotionsCount: Int!
@cypher(statement: "MATCH (this)<-[emoted:EMOTED]-(:User) RETURN COUNT(DISTINCT emoted)")
group: Group @relation(name: "IN", direction: "OUT")
}
input _PostInput {
@ -184,6 +187,7 @@ type Mutation {
language: String
categoryIds: [ID]
contentExcerpt: String
groupId: ID
): Post
UpdatePost(
id: ID!