From 9f86b3c68580e47889c33a50aa21b828f3f7ec37 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 14 Jun 2022 14:38:41 +0200 Subject: [PATCH] Update schema --- server/schema.graphql | 55 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/server/schema.graphql b/server/schema.graphql index 99c5eed1..4b3f0434 100644 --- a/server/schema.graphql +++ b/server/schema.graphql @@ -301,6 +301,16 @@ type ContentBlockNode implements Node & ContentBlockInterface { originalCreator: PublicUserNode } +type ContentBlockNodeConnection { + pageInfo: PageInfo! + edges: [ContentBlockNodeEdge]! +} + +type ContentBlockNodeEdge { + node: ContentBlockNode + cursor: String! +} + input ContentElementInput { id: String type: InputTypes! @@ -434,6 +444,18 @@ type DeleteRoomPayload { clientMutationId: String } +input DeleteSnapshotInput { + id: ID! + clientMutationId: String +} + +type DeleteSnapshotPayload { + result: DeleteSnapshotResult + clientMutationId: String +} + +union DeleteSnapshotResult = Success | NotOwner + type DjangoDebug { sql: [DjangoDebugSQL] } @@ -678,6 +700,7 @@ type Mutation { applySnapshot(input: ApplySnapshotInput!): ApplySnapshotPayload shareSnapshot(input: ShareSnapshotInput!): ShareSnapshotPayload updateSnapshot(input: UpdateSnapshotInput!): UpdateSnapshotPayload + deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload _debug: DjangoDebug } @@ -755,6 +778,16 @@ type ObjectiveNode implements Node { mine: Boolean } +type ObjectiveNodeConnection { + pageInfo: PageInfo! + edges: [ObjectiveNodeEdge]! +} + +type ObjectiveNodeEdge { + node: ObjectiveNode + cursor: String! +} + type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! @@ -954,14 +987,20 @@ type SnapshotContentBlockNode implements Node & ContentBlockInterface { } type SnapshotNode implements Node { - title: String id: ID! + module: ModuleNode! chapters: [SnapshotChapterNode] + hiddenContentBlocks(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, title: String): ContentBlockNodeConnection! + created: DateTime! + creator: String! + shared: Boolean! + objectiveGroups: [SnapshotObjectiveGroupNode] + hiddenObjectives(offset: Int, before: String, after: String, first: Int, last: Int, text: String): ObjectiveNodeConnection! + title: String + metaTitle: String + heroImage: String changes: SnapshotChangesNode mine: Boolean - shared: Boolean! - creator: String! - objectiveGroups: [SnapshotObjectiveGroupNode] } type SnapshotNodeConnection { @@ -1048,6 +1087,14 @@ type SubmissionFeedbackNode implements Node { id: ID! } +type Success implements SuccessNode { + message: String +} + +interface SuccessNode { + message: String +} + type SurveyNode implements Node { id: ID! title: String!