daddy/internal/graph/query.graphql
William Petit 9c6ebae9bc Ajout d'une query GraphQL pour vérifier les autorisations côté serveur
- Intégration des vérifications de droits sur la page de
  création/modification des groupes de travail
2020-09-04 11:19:24 +02:00

53 lines
844 B
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]!
}
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
}
type Query {
userProfile: User
workgroups(filter: WorkgroupsFilter): [Workgroup]!
decisionSupportFiles(filter: DecisionSupportFileFilter): [DecisionSupportFile]!
isAuthorized(action: String!, object: AuthorizationObject!): Boolean!
}