lint fixes

fix relation directive
This commit is contained in:
Ulf Gebhardt 2025-05-03 00:08:11 +02:00
parent 9517125de7
commit 94c6f7a316
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
24 changed files with 233 additions and 211 deletions

View File

@ -176,7 +176,7 @@ module.exports = {
overrides: [
{
files: ['*.js', '+.cjs', '*.ts', '*.tsx'],
extends: ['plugin:security/recommended-legacy']
extends: ['plugin:security/recommended-legacy'],
},
// only for ts files
{
@ -231,7 +231,24 @@ module.exports = {
parser: '@graphql-eslint/eslint-plugin',
plugins: ['@graphql-eslint'],
extends: ['plugin:@graphql-eslint/schema-recommended'],
rules: {},
rules: {
'@graphql-eslint/description-style': ['error', { style: 'inline' }],
'@graphql-eslint/require-description': 'off',
'@graphql-eslint/naming-convention': 'off',
'@graphql-eslint/strict-id-in-types': 'off',
'@graphql-eslint/no-typename-prefix': 'off',
// incompatible: `depends on a GraphQL validation rule "XXX" but it's not available in the "graphql" version you are using. Skipping…`
'@graphql-eslint/known-directives': 'off',
'@graphql-eslint/known-argument-names': 'off',
'@graphql-eslint/known-type-names': 'off',
'@graphql-eslint/lone-schema-definition': 'off',
'@graphql-eslint/provided-required-arguments': 'off',
'@graphql-eslint/unique-directive-names': 'off',
'@graphql-eslint/unique-directive-names-per-location': 'off',
'@graphql-eslint/unique-field-definition-names': 'off',
'@graphql-eslint/unique-operation-types': 'off',
'@graphql-eslint/unique-type-names': 'off',
},
parserOptions: {
schema: './src/graphql/types/**/*.gql',
assumeValid: true,

View File

@ -1,11 +1,14 @@
# directive @MutationMeta on FIELD_DEFINITION
# directive @isAuthenticated on FIELD_DEFINITION
# directive @hasRole on FIELD_DEFINITION
# directive @hasScope on FIELD_DEFINITION
# directive @additionalLabels on FIELD_DEFINITION
directive @cypher(statement: String) on FIELD_DEFINITION
directive @relation(
name: String
direction: String
name: String
from: String
to: String
direction: String
) on FIELD_DEFINITION | OBJECT
directive @MutationMeta on FIELD_DEFINITION
directive @neo4j_ignore on FIELD_DEFINITION
directive @isAuthenticated on FIELD_DEFINITION
directive @hasRole on FIELD_DEFINITION
directive @hasScope on FIELD_DEFINITION
directive @additionalLabels on FIELD_DEFINITION

View File

@ -2,4 +2,4 @@ enum EmailNotificationSettingsType {
post
chat
group
}
}

View File

@ -4,4 +4,4 @@ enum Emotion {
happy
angry
funny
}
}

View File

@ -1,3 +1,3 @@
enum ShoutTypeEnum {
Post
}
}

View File

@ -2,4 +2,4 @@ enum Visibility {
public
friends
private
}
}

View File

@ -50,9 +50,11 @@ type Comment {
isPostObservedByMe: Boolean!
@cypher(
statement: "MATCH (this)-[:COMMENTS]->(:Post)<-[obs:OBSERVES]-(u:User {id: $cypherParams.currentUserId}) WHERE obs.active = true RETURN COUNT(u) >= 1"
)
postObservingUsersCount: Int!
@cypher(statement: "MATCH (this)-[:COMMENTS]->(:Post)<-[obs:OBSERVES]-(u:User) WHERE obs.active = true AND NOT u.disabled = true AND NOT u.deleted = true RETURN COUNT(DISTINCT u)")
)
postObservingUsersCount: Int!
@cypher(
statement: "MATCH (this)-[:COMMENTS]->(:Post)<-[obs:OBSERVES]-(u:User) WHERE obs.active = true AND NOT u.disabled = true AND NOT u.deleted = true RETURN COUNT(DISTINCT u)"
)
}
type Query {
@ -69,16 +71,7 @@ type Query {
}
type Mutation {
CreateComment(
id: ID
postId: ID!
content: String!
contentExcerpt: String
): Comment
UpdateComment(
id: ID!
content: String!
contentExcerpt: String
): Comment
CreateComment(id: ID, postId: ID!, content: String!, contentExcerpt: String): Comment
UpdateComment(id: ID!, content: String!, contentExcerpt: String): Comment
DeleteComment(id: ID!): Comment
}

View File

@ -13,4 +13,4 @@ type Query {
type Mutation {
UpdateDonations(showDonations: Boolean, goal: Int, progress: Int): Donations
}
}

View File

@ -22,8 +22,5 @@ type Mutation {
locale: String
): User
AddEmailAddress(email: String!): EmailAddress
VerifyEmailAddress(
nonce: String!
email: String!
): EmailAddress
VerifyEmailAddress(nonce: String!, email: String!): EmailAddress
}

View File

@ -5,7 +5,7 @@ type FILED {
submitter: User
}
# this list equals the strings of an array in file "webapp/constants/modals.js"
"this list equals the strings of an array in file `webapp/constants/modals.js`"
enum ReasonCategory {
other
discrimination_etc
@ -26,5 +26,9 @@ type FiledReport {
}
type Mutation {
fileReport(resourceId: ID!, reasonCategory: ReasonCategory!, reasonDescription: String!): FiledReport
}
fileReport(
resourceId: ID!
reasonCategory: ReasonCategory!
reasonDescription: String!
): FiledReport
}

View File

@ -1,19 +1,19 @@
enum _GroupOrdering {
id_asc
id_desc
name_asc
name_desc
slug_asc
slug_desc
locationName_asc
locationName_desc
about_asc
about_desc
createdAt_asc
createdAt_desc
updatedAt_asc
updatedAt_desc
}
# enum _GroupOrdering {
# id_asc
# id_desc
# name_asc
# name_desc
# slug_asc
# slug_desc
# locationName_asc
# locationName_desc
# about_asc
# about_desc
# createdAt_asc
# createdAt_desc
# updatedAt_asc
# updatedAt_desc
# }
type Group {
id: ID!
@ -39,13 +39,14 @@ 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")
isMutedByMe: Boolean! @cypher(statement: "MATCH (this) RETURN EXISTS( (this)<-[:MUTED]-(:User {id: $cypherParams.currentUserId}) )")
isMutedByMe: Boolean!
@cypher(
statement: "MATCH (this) RETURN EXISTS( (this)<-[:MUTED]-(:User {id: $cypherParams.currentUserId}) )"
)
}
input _GroupFilter {
AND: [_GroupFilter!]
OR: [_GroupFilter!]
@ -69,20 +70,18 @@ type Query {
slug: String
first: Int
offset: Int
# orderBy: [_GroupOrdering] # not implemented yet
# filter: _GroupFilter # not implemented yet
): [Group]
# orderBy: [_GroupOrdering] # not implemented yet
# filter: _GroupFilter # not implemented yet
GroupMembers(
id: ID!
# first: Int # not implemented yet
# offset: Int # not implemented yet
# orderBy: [_UserOrdering] # not implemented yet
# filter: _UserFilter # not implemented yet
): [User]
GroupMembers(id: ID!): [User]
# first: Int # not implemented yet
# orderBy: [_UserOrdering] # not implemented yet
# offset: Int # not implemented yet
# filter: _UserFilter # not implemented yet
GroupCount(isMember: Boolean): Int
# AvailableGroupTypes: [GroupType]!
# AvailableGroupActionRadii: [GroupActionRadius]!
@ -100,7 +99,9 @@ type Mutation {
groupType: GroupType!
actionRadius: GroupActionRadius!
categoryIds: [ID]
# avatar: ImageInput # a group can not be created with an avatar
locationName: String # empty string '' sets it to null
): Group
@ -110,7 +111,9 @@ type Mutation {
slug: String
about: String
description: String
# groupType: GroupType # is not possible at the moment and has to be discussed. may be in the stronger direction: public → closed → hidden
actionRadius: GroupActionRadius
categoryIds: [ID]
avatar: ImageInput # test this as result
@ -119,27 +122,14 @@ type Mutation {
# DeleteGroup(id: ID!): Group
JoinGroup(
groupId: ID!
userId: ID!
): User
JoinGroup(groupId: ID!, userId: ID!): User
LeaveGroup(
groupId: ID!
userId: ID!
): User
LeaveGroup(groupId: ID!, userId: ID!): User
ChangeGroupMemberRole(
groupId: ID!
userId: ID!
roleInGroup: GroupMemberRole!
): User
ChangeGroupMemberRole(groupId: ID!, userId: ID!, roleInGroup: GroupMemberRole!): User
RemoveUserFromGroup(
groupId: ID!
userId: ID!
): User
RemoveUserFromGroup(groupId: ID!, userId: ID!): User
muteGroup(groupId: ID!): Group
unmuteGroup(groupId: ID!): Group
unmuteGroup(groupId: ID!): Group
}

View File

@ -1,20 +1,22 @@
type Image {
url: ID!,
url: ID!
# urlW34: String,
# urlW160: String,
# urlW320: String,
# urlW640: String,
# urlW1024: String,
alt: String,
sensitive: Boolean,
aspectRatio: Float,
type: String,
alt: String
sensitive: Boolean
aspectRatio: Float
type: String
}
input ImageInput {
alt: String,
upload: Upload,
sensitive: Boolean,
aspectRatio: Float,
type: String,
alt: String
upload: Upload
sensitive: Boolean
aspectRatio: Float
type: String
}

View File

@ -6,7 +6,6 @@ type InviteCode {
expiresAt: String
}
type Mutation {
GenerateInviteCode(expiresAt: String = null): InviteCode
}

View File

@ -17,7 +17,7 @@ type Location {
distanceToMe: Int
}
# This is not smart - we need one location for everything - use the same type everywhere!
"This is not smart - we need one location for everything - use the same type everywhere!"
type LocationMapBox {
id: ID!
place_name: String!

View File

@ -13,14 +13,17 @@ type Message {
updatedAt: String
content: String!
author: User! @relation(name: "CREATED", direction: "IN")
room: Room! @relation(name: "INSIDE", direction: "OUT")
senderId: String! @cypher(statement: "MATCH (this)<-[:CREATED]-(user:User) RETURN user.id")
username: String! @cypher(statement: "MATCH (this)<-[:CREATED]-(user:User) RETURN user.name")
avatar: String @cypher(statement: "MATCH (this)<-[:CREATED]-(:User)-[:AVATAR_IMAGE]->(image:Image) RETURN image.url")
date: String! @cypher(statement: "RETURN this.createdAt")
avatar: String
@cypher(
statement: "MATCH (this)<-[:CREATED]-(:User)-[:AVATAR_IMAGE]->(image:Image) RETURN image.url"
)
date: String! @cypher(statement: "RETURN this.createdAt")
saved: Boolean
distributed: Boolean
@ -28,21 +31,13 @@ type Message {
}
type Mutation {
CreateMessage(
roomId: ID!
content: String!
): Message
CreateMessage(roomId: ID!, content: String!): Message
MarkMessagesAsSeen(messageIds: [String!]): Boolean
}
type Query {
Message(
roomId: ID!,
first: Int
offset: Int
orderBy: [_MessageOrdering]
): [Message]
Message(roomId: ID!, first: Int, offset: Int, orderBy: [_MessageOrdering]): [Message]
}
type Subscription {

View File

@ -33,7 +33,7 @@ enum NotificationReason {
type Query {
notifications(read: Boolean, orderBy: NotificationOrdering, first: Int, offset: Int): [NOTIFIED]
}
type Mutation {
markAsRead(id: ID!): NOTIFIED
markAllAsRead: [NOTIFIED]

View File

@ -115,7 +115,6 @@ enum _PostOrdering {
eventStart_desc
}
type Post {
id: ID!
activityId: String
@ -133,10 +132,11 @@ type Post {
createdAt: String
updatedAt: String
language: String
pinnedAt: String @cypher(
pinnedAt: String
@cypher(
statement: "MATCH (this)<-[pinned:PINNED]-(:User) WHERE NOT this.deleted = true AND NOT this.disabled = true RETURN pinned.createdAt"
)
pinnedBy: User @relation(name:"PINNED", direction: "IN")
pinnedBy: User @relation(name: "PINNED", direction: "IN")
relatedContributions: [Post]!
@cypher(
statement: """
@ -161,7 +161,7 @@ type Post {
statement: "MATCH (this)<-[:SHOUTED]-(r:User) WHERE NOT r.deleted = true AND NOT r.disabled = true RETURN COUNT(DISTINCT r)"
)
# Has the currently logged in user shouted that post?
"Has the currently logged in user shouted that post?"
shoutedByCurrentUser: Boolean!
@cypher(
statement: "MATCH (this)<-[:SHOUTED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(u) >= 1"
@ -174,15 +174,14 @@ 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)")
group: Group @relation(name: "IN", direction: "OUT")
postType: [PostType]
@cypher(statement: "RETURN [l IN labels(this) WHERE NOT l = 'Post']")
postType: [PostType] @cypher(statement: "RETURN [l IN labels(this) WHERE NOT l = 'Post']")
eventLocationName: String
eventLocation: Location @cypher(statement: "MATCH (this)-[:IS_IN]->(l:Location) RETURN l")
@ -194,9 +193,11 @@ type Post {
isObservedByMe: Boolean!
@cypher(
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 {
@ -217,7 +218,7 @@ type Mutation {
title: String!
slug: String
content: String!
image: ImageInput,
image: ImageInput
visibility: Visibility
language: String
categoryIds: [ID]
@ -232,7 +233,7 @@ type Mutation {
slug: String
content: String!
contentExcerpt: String
image: ImageInput,
image: ImageInput
visibility: Visibility
language: String
categoryIds: [ID]
@ -246,9 +247,9 @@ type Mutation {
unpinPost(id: ID!): Post
markTeaserAsViewed(id: ID!): Post
# Shout the given Type and ID
"Shout the given Type and ID"
shout(id: ID!, type: ShoutTypeEnum): Boolean!
# Unshout the given Type and ID
"Unshout the given Type and ID"
unshout(id: ID!, type: ShoutTypeEnum): Boolean!
toggleObservePost(id: ID!, value: Boolean!): Post!

View File

@ -17,7 +17,13 @@ enum ReportRule {
}
type Query {
reports(orderBy: ReportOrdering, first: Int, offset: Int, reviewed: Boolean, closed: Boolean): [Report]
reports(
orderBy: ReportOrdering
first: Int
offset: Int
reviewed: Boolean
closed: Boolean
): [Report]
}
enum ReportOrdering {

View File

@ -5,7 +5,7 @@
# users_some: _UserFilter
# }
# TODO change this to last message date
"TODO change this to last message date"
enum _RoomOrdering {
lastMessageAt_desc
createdAt_desc
@ -19,41 +19,48 @@ type Room {
users: [User]! @relation(name: "CHATS_IN", direction: "IN")
roomId: String! @cypher(statement: "RETURN this.id")
roomName: String! @cypher(statement: "MATCH (this)<-[:CHATS_IN]-(user:User) WHERE NOT user.id = $cypherParams.currentUserId RETURN user.name")
avatar: String @cypher(statement: """
MATCH (this)<-[:CHATS_IN]-(user:User)
WHERE NOT user.id = $cypherParams.currentUserId
OPTIONAL MATCH (user)-[:AVATAR_IMAGE]->(image:Image)
RETURN image.url
""")
roomName: String!
@cypher(
statement: "MATCH (this)<-[:CHATS_IN]-(user:User) WHERE NOT user.id = $cypherParams.currentUserId RETURN user.name"
)
avatar: String
@cypher(
statement: """
MATCH (this)<-[:CHATS_IN]-(user:User)
WHERE NOT user.id = $cypherParams.currentUserId
OPTIONAL MATCH (user)-[:AVATAR_IMAGE]->(image:Image)
RETURN image.url
"""
)
lastMessageAt: String
lastMessage: Message @cypher(statement: """
MATCH (this)<-[:INSIDE]-(message:Message)
WITH message ORDER BY message.indexId DESC LIMIT 1
RETURN message
""")
lastMessage: Message
@cypher(
statement: """
MATCH (this)<-[:INSIDE]-(message:Message)
WITH message ORDER BY message.indexId DESC LIMIT 1
RETURN message
"""
)
unreadCount: Int @cypher(statement: """
MATCH (this)<-[:INSIDE]-(message:Message)<-[:CREATED]-(user:User)
WHERE NOT user.id = $cypherParams.currentUserId
AND NOT message.seen
RETURN count(message)
""")
unreadCount: Int
@cypher(
statement: """
MATCH (this)<-[:INSIDE]-(message:Message)<-[:CREATED]-(user:User)
WHERE NOT user.id = $cypherParams.currentUserId
AND NOT message.seen
RETURN count(message)
"""
)
}
type Mutation {
CreateRoom(
userId: ID!
): Room
CreateRoom(userId: ID!): Room
}
type Query {
Room(
id: ID
orderBy: [_RoomOrdering]
): [Room]
Room(id: ID, orderBy: [_RoomOrdering]): [Room]
UnreadRooms: Int
}

View File

@ -11,4 +11,3 @@ type Statistics {
countFollows: Int!
countShouts: Int!
}

View File

@ -19,7 +19,8 @@ type Tag {
id: ID!
taggedPosts: [Post]! @relation(name: "TAGGED", direction: "IN")
taggedCount: Int! @cypher(statement: "MATCH (this)<-[:TAGGED]-(p) RETURN COUNT(DISTINCT p)")
taggedCountUnique: Int! @cypher(statement: "MATCH (this)<-[:TAGGED]-(p)<-[:WROTE]-(u:User) RETURN COUNT(DISTINCT u)")
taggedCountUnique: Int!
@cypher(statement: "MATCH (this)<-[:TAGGED]-(p)<-[:WROTE]-(u:User) RETURN COUNT(DISTINCT u)")
deleted: Boolean
disabled: Boolean
}
@ -34,11 +35,5 @@ enum _TagOrdering {
}
type Query {
Tag(
id: ID
first: Int
offset: Int
orderBy: [_TagOrdering]
filter: _TagFilter
): [Tag]
Tag(id: ID, first: Int, offset: Int, orderBy: [_TagOrdering], filter: _TagFilter): [Tag]
}

View File

@ -38,7 +38,8 @@ type User {
id: ID!
actorId: String
name: String
email: String! @cypher(statement: "MATCH (this)-[:PRIMARY_EMAIL]->(e:EmailAddress) RETURN e.email")
email: String!
@cypher(statement: "MATCH (this)-[:PRIMARY_EMAIL]->(e:EmailAddress) RETURN e.email")
slug: String!
avatar: Image @relation(name: "AVATAR_IMAGE", direction: "OUT")
deleted: Boolean
@ -64,64 +65,79 @@ type User {
emailNotificationSettings: [EmailNotificationSettings]! @neo4j_ignore
locale: String
friends: [User]! @relation(name: "FRIENDS", direction: "BOTH")
friendsCount: Int! @cypher(statement: "MATCH (this)<-[:FRIENDS]->(r:User) RETURN COUNT(DISTINCT r)")
friendsCount: Int!
@cypher(statement: "MATCH (this)<-[:FRIENDS]->(r:User) RETURN COUNT(DISTINCT r)")
following: [User]! @relation(name: "FOLLOWS", direction: "OUT")
followingCount: Int! @cypher(statement: "MATCH (this)-[:FOLLOWS]->(r:User) RETURN COUNT(DISTINCT r)")
followingCount: Int!
@cypher(statement: "MATCH (this)-[:FOLLOWS]->(r:User) RETURN COUNT(DISTINCT r)")
followedBy: [User]! @relation(name: "FOLLOWS", direction: "IN")
followedByCount: Int! @cypher(statement: "MATCH (this)<-[:FOLLOWS]-(r:User) RETURN COUNT(DISTINCT r)")
followedByCount: Int!
@cypher(statement: "MATCH (this)<-[:FOLLOWS]-(r:User) RETURN COUNT(DISTINCT r)")
inviteCodes: [InviteCode] @relation(name: "GENERATED", direction: "OUT")
redeemedInviteCode: InviteCode @relation(name: "REDEEMED", direction: "OUT")
# Is the currently logged in user following that user?
followedByCurrentUser: Boolean! @cypher(
statement: """
MATCH (this)<-[:FOLLOWS]-(u:User { id: $cypherParams.currentUserId})
RETURN COUNT(u) >= 1
"""
)
"Is the currently logged in user following that user?"
followedByCurrentUser: Boolean!
@cypher(
statement: """
MATCH (this)<-[:FOLLOWS]-(u:User { id: $cypherParams.currentUserId})
RETURN COUNT(u) >= 1
"""
)
isBlocked: Boolean! @cypher(
statement: """
MATCH (this)<-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
blocked: Boolean! @cypher(
statement: """
MATCH (this)-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
isBlocked: Boolean!
@cypher(
statement: """
MATCH (this)<-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
blocked: Boolean!
@cypher(
statement: """
MATCH (this)-[:BLOCKED]-(user:User {id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
isMuted: Boolean!
@cypher(
statement: """
MATCH (this)<-[:MUTED]-(user:User { id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
isMuted: Boolean! @cypher(
statement: """
MATCH (this)<-[:MUTED]-(user:User { id: $cypherParams.currentUserId})
RETURN COUNT(user) >= 1
"""
)
# contributions: [WrittenPost]!
# contributions2(first: Int = 10, offset: Int = 0): [WrittenPost2]!
# @cypher(
# statement: "MATCH (this)-[w:WROTE]->(p:Post) RETURN p as Post, w.timestamp as timestamp"
# )
contributions: [Post]! @relation(name: "WROTE", direction: "OUT")
contributionsCount: Int! @cypher(
statement: """
MATCH (this)-[:WROTE]->(r:Post)
WHERE NOT r.deleted = true AND NOT r.disabled = true
RETURN COUNT(r)
"""
)
contributionsCount: Int!
@cypher(
statement: """
MATCH (this)-[:WROTE]->(r:Post)
WHERE NOT r.deleted = true AND NOT r.disabled = true
RETURN COUNT(r)
"""
)
comments: [Comment]! @relation(name: "WROTE", direction: "OUT")
commentedCount: Int! @cypher(statement: "MATCH (this)-[:WROTE]->(:Comment)-[:COMMENTS]->(p:Post) WHERE NOT p.deleted = true AND NOT p.disabled = true RETURN COUNT(DISTINCT(p))")
commentedCount: Int!
@cypher(
statement: "MATCH (this)-[:WROTE]->(:Comment)-[:COMMENTS]->(p:Post) WHERE NOT p.deleted = true AND NOT p.disabled = true RETURN COUNT(DISTINCT(p))"
)
shouted: [Post]! @relation(name: "SHOUTED", direction: "OUT")
shoutedCount: Int! @cypher(statement: "MATCH (this)-[:SHOUTED]->(r:Post) WHERE NOT r.deleted = true AND NOT r.disabled = true RETURN COUNT(DISTINCT r)")
shoutedCount: Int!
@cypher(
statement: "MATCH (this)-[:SHOUTED]->(r:Post) WHERE NOT r.deleted = true AND NOT r.disabled = true RETURN COUNT(DISTINCT r)"
)
categories: [Category] @relation(name: "CATEGORIZED", direction: "OUT")
@ -134,18 +150,18 @@ type User {
emotions: [EMOTED]
activeCategories: [String] @cypher(
statement: """
MATCH (category:Category)
WHERE NOT ((this)-[:NOT_INTERESTED_IN]->(category))
RETURN collect(category.id)
"""
)
activeCategories: [String]
@cypher(
statement: """
MATCH (category:Category)
WHERE NOT ((this)-[:NOT_INTERESTED_IN]->(category))
RETURN collect(category.id)
"""
)
myRoleInGroup: GroupMemberRole
}
input _UserFilter {
AND: [_UserFilter!]
OR: [_UserFilter!]
@ -200,7 +216,7 @@ type Query {
filter: _UserFilter
): [User]
availableRoles: [UserRole]!
availableRoles: [UserRole]!
mutedUsers: [User]
blockedUsers: [User]
currentUser: User!
@ -212,7 +228,7 @@ enum Deletable {
}
type Mutation {
UpdateUser (
UpdateUser(
id: ID!
name: String
email: String
@ -242,14 +258,14 @@ type Mutation {
switchUserRole(role: UserRole!, id: ID!): User
saveCategorySettings(activeCategories: [String]): Boolean
updateOnlineStatus(status: OnlineStatus!): Boolean!
requestPasswordReset(email: String!): Boolean!
resetPassword(email: String!, nonce: String!, newPassword: String!): Boolean!
changePassword(oldPassword: String!, newPassword: String!): String!
# Get a JWT Token for the given Email and password
"Get a JWT Token for the given Email and password"
login(email: String!, password: String!): String!
setTrophyBadgeSelected(slot: Int!, badgeId: ID): User

View File

@ -4,7 +4,5 @@ type UserData {
}
type Query {
userData(
id: ID
): UserData
userData(id: ID): UserData
}