daddy/internal/graph/query.graphql

73 lines
1.1 KiB
GraphQL

scalar Time
scalar Map
type User {
id: ID!
name: String
email: String!
connectedAt: Time!
createdAt: Time!
workgroups:[Workgroup]!
}
type Workgroup {
id: ID!
name: String
createdAt: Time!
closedAt: Time
members: [User]!
}
type Event {
id: ID!
type: String!
createdAt: Time!
updatedAt: Time!
objectId: ID!
objectType: String!
user: User!
}
input WorkgroupsFilter {
ids: [ID]
}
type DecisionSupportFile {
id: ID!
title: String
sections: Map
status: String
workgroup: Workgroup
createdAt: Time
updatedAt: Time
votedAt: Time
closedAt: Time
}
input DecisionSupportFileFilter {
ids: [ID]
}
input AuthorizationObject {
workgroupId: ID
userId: ID
decisionSupportFileId: ID
}
input EventFilter {
objectType: String
objectId: ID
userId: ID
type: String
from: Time
to: Time
}
type Query {
userProfile: User
workgroups(filter: WorkgroupsFilter): [Workgroup]!
decisionSupportFiles(filter: DecisionSupportFileFilter): [DecisionSupportFile]!
events(filter: EventFilter): [Event]!
isAuthorized(action: String!, object: AuthorizationObject!): Boolean!
}