diff --git a/client/src/@types/index.ts b/client/src/@types/index.ts index ded96fb9..67f6cb13 100644 --- a/client/src/@types/index.ts +++ b/client/src/@types/index.ts @@ -1,3 +1,5 @@ +import { ContentBlockNode } from '@/__generated__/graphql'; + export type numberOrUndefined = number | undefined; type types = 'task' | 'normal' | 'base_communication' | 'base_society' | 'base_interdisciplinary' | 'instrument'; @@ -17,8 +19,8 @@ export interface InstrumentCategory { export interface Hideable { userCreated: boolean; - hiddenFor: any[]; - visibleFor: any[]; + // hiddenFor: any[]; + // visibleFor: any[]; titleHiddenFor: any[]; descriptionHiddenFor: any[]; hidden: boolean; @@ -30,12 +32,17 @@ export interface ContentBlock extends Hideable, Page { type: types; notes: any[]; bookmarks: any[]; - indent?: boolean; instrumentCategory: InstrumentCategory; mine: boolean; root: string; } +export interface ExtendedContentBlockNode extends ContentBlockNode { + indent?: boolean; + notes: any[]; + root: string; +} + export interface Chapter extends Hideable, Page { contentBlocks: ContentBlock[]; bookmark: any; diff --git a/client/src/__generated__/graphql.ts b/client/src/__generated__/graphql.ts index 581eba13..3e13c9b4 100644 --- a/client/src/__generated__/graphql.ts +++ b/client/src/__generated__/graphql.ts @@ -9,16 +9,36 @@ export type MakeEmpty = export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - Date: { input: any; output: any; } - DateTime: { input: any; output: any; } - GenericStreamFieldType: { input: any; output: any; } - JSONString: { input: any; output: any; } - UUID: { input: any; output: any; } + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + /** + * The `Date` scalar type represents a Date + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + Date: { input: any; output: any }; + /** + * The `DateTime` scalar type represents a DateTime + * value as specified by + * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). + */ + DateTime: { input: any; output: any }; + GenericStreamFieldType: { input: any; output: any }; + /** + * Allows use of a JSON String for input / output from the GraphQL schema. + * + * Use of this type is *not recommended* as you lose the benefits of having a defined, static + * schema (one of the key benefits of GraphQL). + */ + JSONString: { input: any; output: any }; + /** + * Leverages the internal Python implementation of UUID (uuid.UUID) to provide native UUID objects + * in fields, resolvers and input. + */ + UUID: { input: any; output: any }; }; export type AddCommentInput = { @@ -192,6 +212,7 @@ export type AddRoomPayload = { export type AnswerNode = Node & { __typename?: 'AnswerNode'; data: Scalars['JSONString']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; owner: PrivateUserNode; pk?: Maybe; @@ -200,13 +221,18 @@ export type AnswerNode = Node & { export type AnswerNodeConnection = { __typename?: 'AnswerNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `AnswerNode` and its cursor. */ export type AnswerNodeEdge = { __typename?: 'AnswerNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -235,6 +261,7 @@ export type AssignmentNode = Node & { assignment: Scalars['String']['output']; created: Scalars['DateTime']['output']; deleted: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; modified: Scalars['DateTime']['output']; module: ModuleNode; @@ -247,9 +274,26 @@ export type AssignmentNode = Node & { userCreated: Scalars['Boolean']['output']; }; +/** An enumeration. */ +export enum BooksModuleCategoryFilterAttributeTypeChoices { + /** All */ + All = 'ALL', + /** Exact */ + Exact = 'EXACT', +} + +/** An enumeration. */ +export enum BooksModuleLevelFilterAttributeTypeChoices { + /** All */ + All = 'ALL', + /** Exact */ + Exact = 'EXACT', +} + export type ChapterBookmarkNode = Node & { __typename?: 'ChapterBookmarkNode'; chapter: ChapterNode; + /** The ID of the object */ id: Scalars['ID']['output']; note?: Maybe; user: PrivateUserNode; @@ -257,13 +301,18 @@ export type ChapterBookmarkNode = Node & { export type ChapterBookmarkNodeConnection = { __typename?: 'ChapterBookmarkNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ChapterBookmarkNode` and its cursor. */ export type ChapterBookmarkNodeEdge = { __typename?: 'ChapterBookmarkNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -272,31 +321,43 @@ export type ChapterInterface = { title?: Maybe; }; -export type ChapterNode = ChapterInterface & Node & { - __typename?: 'ChapterNode'; - bookmark?: Maybe; - contentBlocks?: Maybe>>; - description?: Maybe; - descriptionHiddenFor?: Maybe>>; - id: Scalars['ID']['output']; - path?: Maybe; - slug: Scalars['String']['output']; - title?: Maybe; - titleHiddenFor?: Maybe>>; -}; +export type ChapterNode = ChapterInterface & + Node & { + __typename?: 'ChapterNode'; + bookmark?: Maybe; + contentBlocks?: Maybe>>; + description?: Maybe; + descriptionHiddenFor?: Maybe>>; + /** The ID of the object */ + id: Scalars['ID']['output']; + path?: Maybe; + /** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */ + slug: Scalars['String']['output']; + title?: Maybe; + titleHiddenFor?: Maybe>>; + }; export type ChapterNodeConnection = { __typename?: 'ChapterNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ChapterNode` and its cursor. */ export type ChapterNodeEdge = { __typename?: 'ChapterNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; +/** + * We need to build this ourselves, because we want the active property on the node, because providing it on the + * Connection or Edge for a UserNodeConnection is difficult. + */ export type ClassMemberNode = { __typename?: 'ClassMemberNode'; active?: Maybe; @@ -311,6 +372,7 @@ export type ClassMemberNode = { export type CommentNode = Node & { __typename?: 'CommentNode'; created: Scalars['DateTime']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; owner?: Maybe; text: Scalars['String']['output']; @@ -319,6 +381,7 @@ export type CommentNode = Node & { export type ContentBlockBookmarkNode = Node & { __typename?: 'ContentBlockBookmarkNode'; contentBlock: ContentBlockNode; + /** The ID of the object */ id: Scalars['ID']['output']; note?: Maybe; user: PrivateUserNode; @@ -327,13 +390,18 @@ export type ContentBlockBookmarkNode = Node & { export type ContentBlockBookmarkNodeConnection = { __typename?: 'ContentBlockBookmarkNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ContentBlockBookmarkNode` and its cursor. */ export type ContentBlockBookmarkNodeEdge = { __typename?: 'ContentBlockBookmarkNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -347,35 +415,43 @@ export type ContentBlockInput = { export type ContentBlockInterface = { contents?: Maybe; title?: Maybe; - type?: Maybe; + type: Scalars['String']['output']; }; -export type ContentBlockNode = ContentBlockInterface & Node & { - __typename?: 'ContentBlockNode'; - bookmarks?: Maybe>>; - contents?: Maybe; - hiddenFor?: Maybe>>; - id: Scalars['ID']['output']; - instrumentCategory?: Maybe; - mine?: Maybe; - originalCreator?: Maybe; - path?: Maybe; - slug: Scalars['String']['output']; - title?: Maybe; - type?: Maybe; - userCreated: Scalars['Boolean']['output']; - visibleFor?: Maybe>>; -}; +export type ContentBlockNode = ContentBlockInterface & + Node & { + __typename?: 'ContentBlockNode'; + bookmarks?: Maybe>>; + contents?: Maybe; + hiddenFor?: Maybe>>; + /** The ID of the object */ + id: Scalars['ID']['output']; + instrumentCategory?: Maybe; + mine?: Maybe; + originalCreator?: Maybe; + path?: Maybe; + /** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */ + slug: Scalars['String']['output']; + title?: Maybe; + type: Scalars['String']['output']; + userCreated: Scalars['Boolean']['output']; + visibleFor?: Maybe>>; + }; export type ContentBlockNodeConnection = { __typename?: 'ContentBlockNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ContentBlockNode` and its cursor. */ export type ContentBlockNodeEdge = { __typename?: 'ContentBlockNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -387,11 +463,17 @@ export type ContentElementInput = { }; export type ContentElementValueInput = { + /** To be used for assignment type */ assignment?: InputMaybe; + /** To be used for basic_knowledge type */ description?: InputMaybe; + /** To be used for assignment type */ id?: InputMaybe; + /** To be used for link_block, text_block types */ text?: InputMaybe; + /** To be used for image_block, assignment type */ title?: InputMaybe; + /** To be used for link, image_block types */ url?: InputMaybe; }; @@ -531,26 +613,56 @@ export type DeleteSnapshotPayload = { export type DeleteSnapshotResult = NotOwner | Success; +/** Debugging information for the current query. */ export type DjangoDebug = { __typename?: 'DjangoDebug'; + /** Raise exceptions for this API query. */ + exceptions?: Maybe>>; + /** Executed SQL queries for this API query. */ sql?: Maybe>>; }; +/** Represents a single exception raised. */ +export type DjangoDebugException = { + __typename?: 'DjangoDebugException'; + /** The class of the exception */ + excType: Scalars['String']['output']; + /** The message of the exception */ + message: Scalars['String']['output']; + /** The stack trace */ + stack: Scalars['String']['output']; +}; + +/** Represents a single database query made to a Django managed DB. */ export type DjangoDebugSql = { __typename?: 'DjangoDebugSQL'; + /** The Django database alias (e.g. 'default'). */ alias: Scalars['String']['output']; + /** Duration of this database query in seconds. */ duration: Scalars['Float']['output']; + /** Postgres connection encoding if available. */ encoding?: Maybe; + /** Whether this database query was a SELECT. */ isSelect: Scalars['Boolean']['output']; + /** Whether this database query took more than 10 seconds. */ isSlow: Scalars['Boolean']['output']; + /** Postgres isolation level if available. */ isoLevel?: Maybe; + /** JSON encoded database query parameters. */ params: Scalars['String']['output']; + /** The raw SQL of this query, without params. */ rawSql: Scalars['String']['output']; + /** The actual SQL sent to this database. */ sql?: Maybe; + /** Start time of this database query. */ startTime: Scalars['Float']['output']; + /** Stop time of this database query. */ stopTime: Scalars['Float']['output']; + /** Postgres transaction ID if available. */ transId?: Maybe; + /** Postgres transaction status if available. */ transStatus?: Maybe; + /** The type of database being used (e.g. postrgesql, mysql, sqlite). */ vendor: Scalars['String']['output']; }; @@ -589,11 +701,12 @@ export enum InputTypes { Readonly = 'readonly', Subtitle = 'subtitle', TextBlock = 'text_block', - VideoBlock = 'video_block' + VideoBlock = 'video_block', } export type InstrumentBookmarkNode = Node & { __typename?: 'InstrumentBookmarkNode'; + /** The ID of the object */ id: Scalars['ID']['output']; instrument: InstrumentNode; note?: Maybe; @@ -605,6 +718,7 @@ export type InstrumentCategoryNode = Node & { __typename?: 'InstrumentCategoryNode'; background: Scalars['String']['output']; foreground: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; name: Scalars['String']['output']; types?: Maybe>>; @@ -614,29 +728,38 @@ export type InstrumentNode = Node & { __typename?: 'InstrumentNode'; bookmarks?: Maybe>>; contents?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; intro: Scalars['String']['output']; language?: Maybe; + /** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */ slug: Scalars['String']['output']; + /** Der Seitentitel, der öffentlich angezeigt werden soll */ title: Scalars['String']['output']; type?: Maybe; }; export type InstrumentNodeConnection = { __typename?: 'InstrumentNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `InstrumentNode` and its cursor. */ export type InstrumentNodeEdge = { __typename?: 'InstrumentNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; export type InstrumentTypeNode = Node & { __typename?: 'InstrumentTypeNode'; category?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; name: Scalars['String']['output']; type: Scalars['String']['output']; @@ -689,20 +812,17 @@ export type ModuleBookmarkNode = { user: PrivateUserNode; }; -export enum ModuleCategoryFilterAttributeType { - All = 'ALL', - Exact = 'EXACT' -} - export type ModuleCategoryNode = Node & { __typename?: 'ModuleCategoryNode'; - filterAttributeType: ModuleCategoryFilterAttributeType; + filterAttributeType: BooksModuleCategoryFilterAttributeTypeChoices; + /** The ID of the object */ id: Scalars['ID']['output']; moduleSet: ModuleNodeConnection; name: Scalars['String']['output']; + /** Order in the Dropdown List */ + order: Scalars['Int']['output']; }; - export type ModuleCategoryNodeModuleSetArgs = { after?: InputMaybe; before?: InputMaybe; @@ -719,38 +839,41 @@ export type ModuleCategoryNodeModuleSetArgs = { export type ModuleConnection = { __typename?: 'ModuleConnection'; + /** Contains the nodes in this connection. */ edges: Array>; nodes?: Maybe>>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `Module` and its cursor. */ export type ModuleEdge = { __typename?: 'ModuleEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; export type ModuleInterface = { heroImage: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; pk?: Maybe; topic?: Maybe; }; -export enum ModuleLevelFilterAttributeType { - All = 'ALL', - Exact = 'EXACT' -} - export type ModuleLevelNode = Node & { __typename?: 'ModuleLevelNode'; - filterAttributeType: ModuleLevelFilterAttributeType; + filterAttributeType: BooksModuleLevelFilterAttributeTypeChoices; + /** The ID of the object */ id: Scalars['ID']['output']; moduleSet: ModuleNodeConnection; name: Scalars['String']['output']; + /** Order in the Dropdown List */ + order: Scalars['Int']['output']; }; - export type ModuleLevelNodeModuleSetArgs = { after?: InputMaybe; before?: InputMaybe; @@ -772,12 +895,15 @@ export type ModuleNode = ModuleInterface & { category?: Maybe; chapters?: Maybe>>; heroImage: Scalars['String']['output']; + /** e.g. 'Reuters', 'Wikipedia' */ heroSource: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; inEditMode: Scalars['Boolean']['output']; intro: Scalars['String']['output']; language?: Maybe; level?: Maybe; + /** e.g. 'Intro' or 'Modul 1' */ metaTitle: Scalars['String']['output']; myAnswers?: Maybe; myChapterBookmarks?: Maybe; @@ -785,15 +911,16 @@ export type ModuleNode = ModuleInterface & { mySubmissions?: Maybe; objectiveGroups?: Maybe>>; pk?: Maybe; + /** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */ slug: Scalars['String']['output']; snapshots?: Maybe>>; solutionsEnabled?: Maybe; teaser: Scalars['String']['output']; + /** Der Seitentitel, der öffentlich angezeigt werden soll */ title: Scalars['String']['output']; topic?: Maybe; }; - export type ModuleNodeMyAnswersArgs = { after?: InputMaybe; before?: InputMaybe; @@ -802,7 +929,6 @@ export type ModuleNodeMyAnswersArgs = { offset?: InputMaybe; }; - export type ModuleNodeMyChapterBookmarksArgs = { after?: InputMaybe; before?: InputMaybe; @@ -811,7 +937,6 @@ export type ModuleNodeMyChapterBookmarksArgs = { offset?: InputMaybe; }; - export type ModuleNodeMyContentBookmarksArgs = { after?: InputMaybe; before?: InputMaybe; @@ -820,7 +945,6 @@ export type ModuleNodeMyContentBookmarksArgs = { offset?: InputMaybe; }; - export type ModuleNodeMySubmissionsArgs = { after?: InputMaybe; before?: InputMaybe; @@ -831,13 +955,18 @@ export type ModuleNodeMySubmissionsArgs = { export type ModuleNodeConnection = { __typename?: 'ModuleNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ModuleNode` and its cursor. */ export type ModuleNodeEdge = { __typename?: 'ModuleNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -918,287 +1047,230 @@ export type Mutation = { updateTeam?: Maybe; }; - export type MutationAddCommentArgs = { input: AddCommentInput; }; - export type MutationAddContentBlockArgs = { input: AddContentBlockInput; }; - export type MutationAddModuleRoomEntryArgs = { input: AddModuleRoomEntryInput; }; - export type MutationAddNoteArgs = { input: AddNoteInput; }; - export type MutationAddObjectiveArgs = { input: AddObjectiveInput; }; - export type MutationAddProjectArgs = { input: AddProjectInput; }; - export type MutationAddProjectEntryArgs = { input: AddProjectEntryInput; }; - export type MutationAddRemoveMemberArgs = { input: AddRemoveMemberInput; }; - export type MutationAddRoomArgs = { input: AddRoomInput; }; - export type MutationAddRoomEntryArgs = { input: AddRoomEntryInput; }; - export type MutationApplySnapshotArgs = { input: ApplySnapshotInput; }; - export type MutationCouponArgs = { input: CouponInput; }; - export type MutationCreateSchoolClassArgs = { input: CreateSchoolClassInput; }; - export type MutationCreateSnapshotArgs = { input: CreateSnapshotInput; }; - export type MutationCreateTeamArgs = { input: CreateTeamInput; }; - export type MutationDeleteContentBlockArgs = { input: DeleteContentBlockInput; }; - export type MutationDeleteObjectiveArgs = { input: DeleteObjectiveInput; }; - export type MutationDeleteProjectArgs = { input: DeleteProjectInput; }; - export type MutationDeleteProjectEntryArgs = { input: DeleteProjectEntryInput; }; - export type MutationDeleteRoomArgs = { input: DeleteRoomInput; }; - export type MutationDeleteRoomEntryArgs = { input: DeleteRoomEntryInput; }; - export type MutationDeleteSnapshotArgs = { input: DeleteSnapshotInput; }; - export type MutationDuplicateContentBlockArgs = { input: DuplicateContentBlockInput; }; - export type MutationJoinClassArgs = { input: JoinClassInput; }; - export type MutationJoinTeamArgs = { input: JoinTeamInput; }; - export type MutationMutateContentBlockArgs = { input: MutateContentBlockInput; }; - export type MutationSetLanguageArgs = { language: Scalars['String']['input']; }; - export type MutationShareSnapshotArgs = { input: ShareSnapshotInput; }; - export type MutationSpellCheckArgs = { input: SpellCheckInput; }; - export type MutationSyncModuleVisibilityArgs = { input: SyncModuleVisibilityInput; }; - export type MutationUpdateAnswerArgs = { input: UpdateAnswerInput; }; - export type MutationUpdateAssignmentArgs = { input: UpdateAssignmentInput; }; - export type MutationUpdateAvatarArgs = { input: UpdateAvatarInput; }; - export type MutationUpdateChapterBookmarkArgs = { input: UpdateChapterBookmarkInput; }; - export type MutationUpdateChapterVisibilityArgs = { input: UpdateChapterVisibilityInput; }; - export type MutationUpdateContentBookmarkArgs = { input: UpdateContentBookmarkInput; }; - export type MutationUpdateInstrumentBookmarkArgs = { input: UpdateInstrumentBookmarkInput; }; - export type MutationUpdateLastModuleArgs = { input: UpdateLastModuleInput; }; - export type MutationUpdateLastModuleLevelArgs = { input: UpdateLastModuleLevelInput; }; - export type MutationUpdateLastTopicArgs = { input: UpdateLastTopicInput; }; - export type MutationUpdateModuleBookmarkArgs = { input: UpdateModuleBookmarkInput; }; - export type MutationUpdateNoteArgs = { input: UpdateNoteInput; }; - export type MutationUpdateObjectiveGroupVisibilityArgs = { input: UpdateObjectiveGroupVisibilityInput; }; - export type MutationUpdateObjectiveVisibilityArgs = { input: UpdateObjectiveVisibilityInput; }; - export type MutationUpdatePasswordArgs = { input: UpdatePasswordInput; }; - export type MutationUpdateProjectArgs = { input: UpdateProjectInput; }; - export type MutationUpdateProjectEntryArgs = { input: UpdateProjectEntryInput; }; - export type MutationUpdateProjectSharedStateArgs = { input: UpdateProjectSharedStateInput; }; - export type MutationUpdateRoomArgs = { input: UpdateRoomInput; }; - export type MutationUpdateRoomEntryArgs = { input: UpdateRoomEntryInput; }; - export type MutationUpdateRoomVisibilityArgs = { input: UpdateRoomVisibilityInput; }; - export type MutationUpdateSchoolClassArgs = { input: UpdateSchoolClassInput; }; - export type MutationUpdateSettingArgs = { input: UpdateSettingInput; }; - export type MutationUpdateSnapshotArgs = { input: UpdateSnapshotInput; }; - export type MutationUpdateSolutionVisibilityArgs = { input: UpdateSolutionVisibilityInput; }; - export type MutationUpdateSubmissionFeedbackArgs = { input: UpdateSubmissionFeedbackInput; }; - export type MutationUpdateTeamArgs = { input: UpdateTeamInput; }; @@ -1208,6 +1280,7 @@ export type NewsTeaserNode = Node & { date?: Maybe; description?: Maybe; displayDate?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; imageSource: Scalars['String']['output']; imageUrl?: Maybe; @@ -1216,7 +1289,9 @@ export type NewsTeaserNode = Node & { title: Scalars['String']['output']; }; +/** An object with an ID */ export type Node = { + /** The ID of the object */ id: Scalars['ID']['output']; }; @@ -1234,6 +1309,7 @@ export type NoteNode = Node & { __typename?: 'NoteNode'; chapterbookmark?: Maybe; contentblockbookmark?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; instrumentbookmark?: Maybe; modulebookmark?: Maybe; @@ -1245,36 +1321,37 @@ export type ObjectiveGroupNode = Node & { __typename?: 'ObjectiveGroupNode'; displayTitle?: Maybe; hiddenFor?: Maybe>>; + /** The ID of the object */ id: Scalars['ID']['output']; module: ModuleNode; objectives?: Maybe>>; pk?: Maybe; - title?: Maybe; + title?: Maybe; }; export type ObjectiveGroupNodeConnection = { __typename?: 'ObjectiveGroupNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ObjectiveGroupNode` and its cursor. */ export type ObjectiveGroupNodeEdge = { __typename?: 'ObjectiveGroupNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; -export enum ObjectiveGroupTitle { - Interdisciplinary = 'INTERDISCIPLINARY', - LanguageCommunication = 'LANGUAGE_COMMUNICATION', - Society = 'SOCIETY' -} - export type ObjectiveNode = Node & { __typename?: 'ObjectiveNode'; group: ObjectiveGroupNode; hiddenFor?: Maybe>>; hiddenForSnapshots: SnapshotNodeConnection; + /** The ID of the object */ id: Scalars['ID']['output']; mine?: Maybe; order?: Maybe; @@ -1285,7 +1362,6 @@ export type ObjectiveNode = Node & { visibleFor?: Maybe>>; }; - export type ObjectiveNodeHiddenForSnapshotsArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1296,21 +1372,41 @@ export type ObjectiveNodeHiddenForSnapshotsArgs = { export type ObjectiveNodeConnection = { __typename?: 'ObjectiveNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `ObjectiveNode` and its cursor. */ export type ObjectiveNodeEdge = { __typename?: 'ObjectiveNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; +/** An enumeration. */ +export enum ObjectivesObjectiveGroupTitleChoices { + /** Überfachliche Lernziele */ + Interdisciplinary = 'INTERDISCIPLINARY', + /** Sprache & Kommunikation */ + LanguageCommunication = 'LANGUAGE_COMMUNICATION', + /** Gesellschaft */ + Society = 'SOCIETY', +} + +/** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ export type PageInfo = { __typename?: 'PageInfo'; + /** When paginating forwards, the cursor to continue. */ endCursor?: Maybe; + /** When paginating forwards, are there more items? */ hasNextPage: Scalars['Boolean']['output']; + /** When paginating backwards, are there more items? */ hasPreviousPage: Scalars['Boolean']['output']; + /** When paginating backwards, the cursor to continue. */ startCursor?: Maybe; }; @@ -1325,6 +1421,7 @@ export type PrivateUserNode = Node & { email: Scalars['String']['output']; expiryDate?: Maybe; firstName: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; isTeacher?: Maybe; language?: Maybe; @@ -1341,10 +1438,10 @@ export type PrivateUserNode = Node & { schoolClasses?: Maybe>>; selectedClass?: Maybe; team?: Maybe; + /** Erforderlich. 150 Zeichen oder weniger. Nur Buchstaben, Ziffern und @/./+/-/_. */ username: Scalars['String']['output']; }; - export type PrivateUserNodeRecentModulesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1352,18 +1449,23 @@ export type PrivateUserNodeRecentModulesArgs = { last?: InputMaybe; offset?: InputMaybe; orderBy?: InputMaybe; - recentModules?: InputMaybe>>; + recentModules?: InputMaybe; }; export type PrivateUserNodeConnection = { __typename?: 'PrivateUserNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `PrivateUserNode` and its cursor. */ export type PrivateUserNodeEdge = { __typename?: 'PrivateUserNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -1372,6 +1474,7 @@ export type ProjectEntryNode = Node & { created: Scalars['DateTime']['output']; description: Scalars['String']['output']; documentUrl: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; project: ProjectNode; }; @@ -1383,6 +1486,7 @@ export type ProjectNode = Node & { entries?: Maybe>>; entriesCount?: Maybe; final: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; objectives: Scalars['String']['output']; owner?: Maybe; @@ -1398,6 +1502,7 @@ export type PublicUserNode = Node & { avatarUrl: Scalars['String']['output']; firstName: Scalars['String']['output']; fullName: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; isMe?: Maybe; lastName: Scalars['String']['output']; @@ -1444,7 +1549,6 @@ export type Query = { topics?: Maybe; }; - export type QueryAllRoomEntriesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1454,7 +1558,6 @@ export type QueryAllRoomEntriesArgs = { slug?: InputMaybe; }; - export type QueryAllUsersArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1465,17 +1568,14 @@ export type QueryAllUsersArgs = { username?: InputMaybe; }; - export type QueryAssignmentArgs = { id: Scalars['ID']['input']; }; - export type QueryChapterArgs = { id: Scalars['ID']['input']; }; - export type QueryChaptersArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1486,40 +1586,33 @@ export type QueryChaptersArgs = { title?: InputMaybe; }; - export type QueryContentBlockArgs = { id: Scalars['ID']['input']; }; - export type QueryInstrumentArgs = { id?: InputMaybe; slug?: InputMaybe; }; - export type QueryModuleArgs = { id?: InputMaybe; slug?: InputMaybe; }; - export type QueryModuleCategoryArgs = { id: Scalars['ID']['input']; }; - export type QueryModuleLevelArgs = { id: Scalars['ID']['input']; }; - export type QueryModuleRoomArgs = { classId?: InputMaybe; slug?: InputMaybe; }; - export type QueryModulesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1527,7 +1620,6 @@ export type QueryModulesArgs = { last?: InputMaybe; }; - export type QueryMyActivityArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1542,7 +1634,6 @@ export type QueryMyActivityArgs = { title_In?: InputMaybe>>; }; - export type QueryMyInstrumentActivityArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1552,17 +1643,14 @@ export type QueryMyInstrumentActivityArgs = { slug?: InputMaybe; }; - export type QueryNodeArgs = { id: Scalars['ID']['input']; }; - export type QueryObjectiveGroupArgs = { id: Scalars['ID']['input']; }; - export type QueryObjectiveGroupsArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1570,44 +1658,37 @@ export type QueryObjectiveGroupsArgs = { last?: InputMaybe; module_Slug?: InputMaybe; offset?: InputMaybe; - title?: InputMaybe; + title?: InputMaybe; }; - export type QueryProjectArgs = { id?: InputMaybe; slug?: InputMaybe; }; - export type QueryRoomArgs = { appearance?: InputMaybe; id?: InputMaybe; slug?: InputMaybe; }; - export type QueryRoomEntryArgs = { id?: InputMaybe; slug?: InputMaybe; }; - export type QuerySnapshotArgs = { id: Scalars['ID']['input']; }; - export type QueryStudentSubmissionArgs = { id: Scalars['ID']['input']; }; - export type QuerySurveyArgs = { id?: InputMaybe; }; - export type QuerySurveysArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1616,12 +1697,10 @@ export type QuerySurveysArgs = { offset?: InputMaybe; }; - export type QueryTopicArgs = { slug?: InputMaybe; }; - export type QueryTopicsArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1637,6 +1716,7 @@ export type RoomEntryNode = Node & { comments?: Maybe>>; contents?: Maybe; description?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; pk?: Maybe; room: RoomNode; @@ -1646,13 +1726,18 @@ export type RoomEntryNode = Node & { export type RoomEntryNodeConnection = { __typename?: 'RoomEntryNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `RoomEntryNode` and its cursor. */ export type RoomEntryNodeEdge = { __typename?: 'RoomEntryNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -1661,6 +1746,7 @@ export type RoomNode = Node & { appearance: Scalars['String']['output']; description?: Maybe; entryCount?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; pk?: Maybe; restricted: Scalars['Boolean']['output']; @@ -1671,7 +1757,6 @@ export type RoomNode = Node & { userCreated: Scalars['Boolean']['output']; }; - export type RoomNodeRoomEntriesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1689,6 +1774,7 @@ export type SchoolClassInput = { export type SchoolClassNode = Node & { __typename?: 'SchoolClassNode'; code?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; members?: Maybe>>; name: Scalars['String']['output']; @@ -1717,24 +1803,28 @@ export type SnapshotChangesNode = { newObjectives: Scalars['Int']['output']; }; -export type SnapshotChapterNode = ChapterInterface & Node & { - __typename?: 'SnapshotChapterNode'; - contentBlocks?: Maybe>>; - description?: Maybe; - descriptionHidden?: Maybe; - id: Scalars['ID']['output']; - title?: Maybe; - titleHidden?: Maybe; -}; +export type SnapshotChapterNode = ChapterInterface & + Node & { + __typename?: 'SnapshotChapterNode'; + contentBlocks?: Maybe>>; + description?: Maybe; + descriptionHidden?: Maybe; + /** The ID of the object */ + id: Scalars['ID']['output']; + title?: Maybe; + titleHidden?: Maybe; + }; -export type SnapshotContentBlockNode = ContentBlockInterface & Node & { - __typename?: 'SnapshotContentBlockNode'; - contents?: Maybe; - hidden?: Maybe; - id: Scalars['ID']['output']; - title?: Maybe; - type?: Maybe; -}; +export type SnapshotContentBlockNode = ContentBlockInterface & + Node & { + __typename?: 'SnapshotContentBlockNode'; + contents?: Maybe; + hidden?: Maybe; + /** The ID of the object */ + id: Scalars['ID']['output']; + title?: Maybe; + type: Scalars['String']['output']; + }; export type SnapshotNode = Node & { __typename?: 'SnapshotNode'; @@ -1745,6 +1835,7 @@ export type SnapshotNode = Node & { heroImage?: Maybe; hiddenContentBlocks: ContentBlockNodeConnection; hiddenObjectives: ObjectiveNodeConnection; + /** The ID of the object */ id: Scalars['ID']['output']; metaTitle?: Maybe; mine?: Maybe; @@ -1754,7 +1845,6 @@ export type SnapshotNode = Node & { title?: Maybe; }; - export type SnapshotNodeHiddenContentBlocksArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1765,7 +1855,6 @@ export type SnapshotNodeHiddenContentBlocksArgs = { title?: InputMaybe; }; - export type SnapshotNodeHiddenObjectivesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1777,13 +1866,18 @@ export type SnapshotNodeHiddenObjectivesArgs = { export type SnapshotNodeConnection = { __typename?: 'SnapshotNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `SnapshotNode` and its cursor. */ export type SnapshotNodeEdge = { __typename?: 'SnapshotNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -1791,6 +1885,7 @@ export type SnapshotObjectiveGroupNode = Node & { __typename?: 'SnapshotObjectiveGroupNode'; displayTitle: Scalars['String']['output']; hidden: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; objectives: Array>; title: Scalars['String']['output']; @@ -1799,6 +1894,7 @@ export type SnapshotObjectiveGroupNode = Node & { export type SnapshotObjectiveNode = Node & { __typename?: 'SnapshotObjectiveNode'; hidden: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; text: Scalars['String']['output']; }; @@ -1832,6 +1928,7 @@ export type StudentSubmissionNode = Node & { created: Scalars['DateTime']['output']; document: Scalars['String']['output']; final: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; modified: Scalars['DateTime']['output']; student: PrivateUserNode; @@ -1841,13 +1938,18 @@ export type StudentSubmissionNode = Node & { export type StudentSubmissionNodeConnection = { __typename?: 'StudentSubmissionNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `StudentSubmissionNode` and its cursor. */ export type StudentSubmissionNodeEdge = { __typename?: 'StudentSubmissionNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -1862,6 +1964,7 @@ export type SubmissionFeedbackNode = Node & { __typename?: 'SubmissionFeedbackNode'; created: Scalars['DateTime']['output']; final: Scalars['Boolean']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; modified: Scalars['DateTime']['output']; studentSubmission: StudentSubmissionNode; @@ -1883,13 +1986,13 @@ export type SurveyNode = Node & { answer?: Maybe; answers: AnswerNodeConnection; data: Scalars['JSONString']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; module?: Maybe; pk?: Maybe; title: Scalars['String']['output']; }; - export type SurveyNodeAnswersArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1900,13 +2003,18 @@ export type SurveyNodeAnswersArgs = { export type SurveyNodeConnection = { __typename?: 'SurveyNodeConnection'; + /** Contains the nodes in this connection. */ edges: Array>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `SurveyNode` and its cursor. */ export type SurveyNodeEdge = { __typename?: 'SurveyNodeEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; @@ -1927,6 +2035,7 @@ export type TeamNode = Node & { __typename?: 'TeamNode'; code?: Maybe; creator?: Maybe; + /** The ID of the object */ id: Scalars['ID']['output']; isDeleted: Scalars['Boolean']['output']; members?: Maybe>>; @@ -1936,32 +2045,40 @@ export type TeamNode = Node & { export type TopicConnection = { __typename?: 'TopicConnection'; + /** Contains the nodes in this connection. */ edges: Array>; nodes?: Maybe>>; + /** Pagination data for this connection. */ pageInfo: PageInfo; }; +/** A Relay edge containing a `Topic` and its cursor. */ export type TopicEdge = { __typename?: 'TopicEdge'; + /** A cursor for use in pagination */ cursor: Scalars['String']['output']; + /** The item at the end of the edge */ node?: Maybe; }; export type TopicNode = Node & { __typename?: 'TopicNode'; description: Scalars['String']['output']; + /** The ID of the object */ id: Scalars['ID']['output']; instructions?: Maybe; modules?: Maybe; + /** Order of the topic */ order: Scalars['Int']['output']; pk?: Maybe; + /** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */ slug: Scalars['String']['output']; teaser: Scalars['String']['output']; + /** Der Seitentitel, der öffentlich angezeigt werden soll */ title: Scalars['String']['output']; vimeoId?: Maybe; }; - export type TopicNodeModulesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -2141,6 +2258,7 @@ export type UpdateNotePayload = { export type UpdateObjectiveGroupVisibilityInput = { clientMutationId?: InputMaybe; + /** The ID of the objective group */ id: Scalars['ID']['input']; visibility?: InputMaybe>>; }; @@ -2153,6 +2271,7 @@ export type UpdateObjectiveGroupVisibilityPayload = { export type UpdateObjectiveVisibilityInput = { clientMutationId?: InputMaybe; + /** The ID of the objective */ id: Scalars['ID']['input']; visibility?: InputMaybe>>; }; @@ -2368,112 +2487,767 @@ export type UserGroupBlockVisibility = { schoolClassId: Scalars['ID']['input']; }; -export type LanguageQueryQueryVariables = Exact<{ [key: string]: never; }>; +export type LanguageQueryQueryVariables = Exact<{ [key: string]: never }>; - -export type LanguageQueryQuery = { __typename?: 'Query', me?: { __typename?: 'PrivateUserNode', language?: string | null } | null }; +export type LanguageQueryQuery = { + __typename?: 'Query'; + me?: { __typename?: 'PrivateUserNode'; language?: string | null } | null; +}; export type SetLanguageMutationVariables = Exact<{ language: Scalars['String']['input']; }>; +export type SetLanguageMutation = { + __typename?: 'Mutation'; + setLanguage?: { __typename?: 'PrivateUserNode'; language?: string | null } | null; +}; -export type SetLanguageMutation = { __typename?: 'Mutation', setLanguage?: { __typename?: 'PrivateUserNode', language?: string | null } | null }; +export type ReadOnlyQueryQueryVariables = Exact<{ [key: string]: never }>; -export type ReadOnlyQueryQueryVariables = Exact<{ [key: string]: never; }>; +export type ReadOnlyQueryQuery = { + __typename?: 'Query'; + me?: { + __typename?: 'PrivateUserNode'; + readOnly?: boolean | null; + selectedClass?: { __typename?: 'SchoolClassNode'; readOnly?: boolean | null } | null; + } | null; +}; +export type ModuleLevelFragmentFragment = { + __typename?: 'ModuleLevelNode'; + name: string; + id: string; + filterAttributeType: BooksModuleLevelFilterAttributeTypeChoices; +} & { ' $fragmentName'?: 'ModuleLevelFragmentFragment' }; -export type ReadOnlyQueryQuery = { __typename?: 'Query', me?: { __typename?: 'PrivateUserNode', readOnly?: boolean | null, selectedClass?: { __typename?: 'SchoolClassNode', readOnly?: boolean | null } | null } | null }; +export type ModuleFilterQueryQueryVariables = Exact<{ [key: string]: never }>; -export type ModuleLevelFragmentFragment = { __typename?: 'ModuleLevelNode', name: string, id: string, filterAttributeType: ModuleLevelFilterAttributeType } & { ' $fragmentName'?: 'ModuleLevelFragmentFragment' }; - -export type ModuleFilterQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ModuleFilterQueryQuery = { __typename?: 'Query', moduleLevels?: Array<( - { __typename?: 'ModuleLevelNode' } - & { ' $fragmentRefs'?: { 'ModuleLevelFragmentFragment': ModuleLevelFragmentFragment } } - ) | null> | null, moduleCategories?: Array<{ __typename?: 'ModuleCategoryNode', name: string, id: string, filterAttributeType: ModuleCategoryFilterAttributeType } | null> | null, me?: { __typename?: 'PrivateUserNode', language?: string | null } | null }; +export type ModuleFilterQueryQuery = { + __typename?: 'Query'; + moduleLevels?: Array< + | ({ __typename?: 'ModuleLevelNode' } & { + ' $fragmentRefs'?: { ModuleLevelFragmentFragment: ModuleLevelFragmentFragment }; + }) + | null + > | null; + moduleCategories?: Array<{ + __typename?: 'ModuleCategoryNode'; + name: string; + id: string; + filterAttributeType: BooksModuleCategoryFilterAttributeTypeChoices; + } | null> | null; + me?: { __typename?: 'PrivateUserNode'; language?: string | null } | null; +}; export type UpdateLastModuleLevelMutationMutationVariables = Exact<{ input: UpdateLastModuleLevelInput; }>; - -export type UpdateLastModuleLevelMutationMutation = { __typename?: 'Mutation', updateLastModuleLevel?: { __typename?: 'UpdateLastModuleLevelPayload', clientMutationId?: string | null, user?: { __typename?: 'PrivateUserNode', username: string, id: string, lastModuleLevel?: ( - { __typename?: 'ModuleLevelNode' } - & { ' $fragmentRefs'?: { 'ModuleLevelFragmentFragment': ModuleLevelFragmentFragment } } - ) | null } | null } | null }; +export type UpdateLastModuleLevelMutationMutation = { + __typename?: 'Mutation'; + updateLastModuleLevel?: { + __typename?: 'UpdateLastModuleLevelPayload'; + clientMutationId?: string | null; + user?: { + __typename?: 'PrivateUserNode'; + username: string; + id: string; + lastModuleLevel?: + | ({ __typename?: 'ModuleLevelNode' } & { + ' $fragmentRefs'?: { ModuleLevelFragmentFragment: ModuleLevelFragmentFragment }; + }) + | null; + } | null; + } | null; +}; export type ModuleTitleQueryQueryVariables = Exact<{ slug?: InputMaybe; }>; +export type ModuleTitleQueryQuery = { + __typename?: 'Query'; + module?: { __typename?: 'ModuleNode'; title: string } | null; +}; -export type ModuleTitleQueryQuery = { __typename?: 'Query', module?: { __typename?: 'ModuleNode', title: string } | null }; +export type SnapshotListItemFragment = { __typename?: 'SnapshotNode'; shared: boolean } & { + ' $fragmentName'?: 'SnapshotListItemFragment'; +}; -export type SnapshotListItemFragment = { __typename?: 'SnapshotNode', shared: boolean } & { ' $fragmentName'?: 'SnapshotListItemFragment' }; +export type SnapshotTitleFragmentFragment = { __typename?: 'SnapshotNode'; title?: string | null } & { + ' $fragmentName'?: 'SnapshotTitleFragmentFragment'; +}; -export type SnapshotTitleFragmentFragment = { __typename?: 'SnapshotNode', title?: string | null } & { ' $fragmentName'?: 'SnapshotTitleFragmentFragment' }; - -export type SnapshotDetailsFragmentFragment = { __typename?: 'SnapshotNode', id: string, title?: string | null, shared: boolean, created: any, creator: string, mine?: boolean | null } & { ' $fragmentName'?: 'SnapshotDetailsFragmentFragment' }; +export type SnapshotDetailsFragmentFragment = { + __typename?: 'SnapshotNode'; + id: string; + title?: string | null; + shared: boolean; + created: any; + creator: string; + mine?: boolean | null; +} & { ' $fragmentName'?: 'SnapshotDetailsFragmentFragment' }; export type ModuleEditModeQueryQueryVariables = Exact<{ slug?: InputMaybe; }>; - -export type ModuleEditModeQueryQuery = { __typename?: 'Query', module?: { __typename?: 'ModuleNode', inEditMode: boolean, slug: string } | null }; +export type ModuleEditModeQueryQuery = { + __typename?: 'Query'; + module?: { __typename?: 'ModuleNode'; inEditMode: boolean; slug: string } | null; +}; export type ChapterQueryQueryVariables = Exact<{ id: Scalars['ID']['input']; }>; - -export type ChapterQueryQuery = { __typename?: 'Query', chapter?: { __typename?: 'ChapterNode', path?: string | null } | null }; +export type ChapterQueryQuery = { + __typename?: 'Query'; + chapter?: { __typename?: 'ChapterNode'; path?: string | null } | null; +}; export type ContentBlockQueryQueryVariables = Exact<{ id: Scalars['ID']['input']; }>; +export type ContentBlockQueryQuery = { + __typename?: 'Query'; + contentBlock?: { __typename?: 'ContentBlockNode'; path?: string | null } | null; +}; -export type ContentBlockQueryQuery = { __typename?: 'Query', contentBlock?: { __typename?: 'ContentBlockNode', path?: string | null } | null }; +export type MeLanguageQueryVariables = Exact<{ [key: string]: never }>; -export type MeLanguageQueryVariables = Exact<{ [key: string]: never; }>; - - -export type MeLanguageQuery = { __typename?: 'Query', me?: { __typename?: 'PrivateUserNode', language?: string | null } | null }; +export type MeLanguageQuery = { + __typename?: 'Query'; + me?: { __typename?: 'PrivateUserNode'; language?: string | null } | null; +}; export type ModuleSnapshotsQueryQueryVariables = Exact<{ slug: Scalars['String']['input']; }>; - -export type ModuleSnapshotsQueryQuery = { __typename?: 'Query', module?: { __typename?: 'ModuleNode', id: string, title: string, metaTitle: string, slug: string, topic?: { __typename?: 'TopicNode', title: string } | null, snapshots?: Array<( - { __typename?: 'SnapshotNode' } - & { ' $fragmentRefs'?: { 'SnapshotDetailsFragmentFragment': SnapshotDetailsFragmentFragment } } - ) | null> | null } | null }; +export type ModuleSnapshotsQueryQuery = { + __typename?: 'Query'; + module?: { + __typename?: 'ModuleNode'; + id: string; + title: string; + metaTitle: string; + slug: string; + topic?: { __typename?: 'TopicNode'; title: string } | null; + snapshots?: Array< + | ({ __typename?: 'SnapshotNode' } & { + ' $fragmentRefs'?: { SnapshotDetailsFragmentFragment: SnapshotDetailsFragmentFragment }; + }) + | null + > | null; + } | null; +}; export type ModuleSolutionsQueryVariables = Exact<{ slug?: InputMaybe; }>; +export type ModuleSolutionsQuery = { + __typename?: 'Query'; + module?: { __typename?: 'ModuleNode'; solutionsEnabled?: boolean | null; slug: string } | null; +}; -export type ModuleSolutionsQuery = { __typename?: 'Query', module?: { __typename?: 'ModuleNode', solutionsEnabled?: boolean | null, slug: string } | null }; - -export const ModuleLevelFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ModuleLevelFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleLevelNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"filterAttributeType"}}]}}]} as unknown as DocumentNode; -export const SnapshotListItemFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SnapshotListItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SnapshotNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shared"}}]}}]} as unknown as DocumentNode; -export const SnapshotTitleFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SnapshotTitleFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SnapshotNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]} as unknown as DocumentNode; -export const SnapshotDetailsFragmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SnapshotDetailsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SnapshotNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"shared"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"mine"}}]}}]} as unknown as DocumentNode; -export const LanguageQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LanguageQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"language"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}}]}}]} as unknown as DocumentNode; -export const SetLanguageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetLanguage"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"language"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setLanguage"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"language"},"value":{"kind":"Variable","name":{"kind":"Name","value":"language"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"language"}}]}}]}}]} as unknown as DocumentNode; -export const ReadOnlyQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ReadOnlyQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"selectedClass"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}}]}}]} as unknown as DocumentNode; -export const ModuleFilterQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ModuleFilterQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"moduleLevels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ModuleLevelFragment"}}]}},{"kind":"Field","name":{"kind":"Name","value":"moduleCategories"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"filterAttributeType"}}]}},{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"language"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ModuleLevelFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleLevelNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"filterAttributeType"}}]}}]} as unknown as DocumentNode; -export const UpdateLastModuleLevelMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateLastModuleLevelMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateLastModuleLevelInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateLastModuleLevel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clientMutationId"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastModuleLevel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ModuleLevelFragment"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ModuleLevelFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleLevelNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"filterAttributeType"}}]}}]} as unknown as DocumentNode; -export const ModuleTitleQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ModuleTitleQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"module"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]} as unknown as DocumentNode; -export const ModuleEditModeQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ModuleEditModeQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"module"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inEditMode"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode; -export const ChapterQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ChapterQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"chapter"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}}]}}]}}]} as unknown as DocumentNode; -export const ContentBlockQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ContentBlockQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"contentBlock"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}}]}}]}}]} as unknown as DocumentNode; -export const MeLanguageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MeLanguage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"language"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}}]}}]} as unknown as DocumentNode; -export const ModuleSnapshotsQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ModuleSnapshotsQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"module"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"metaTitle"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"topic"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"Field","name":{"kind":"Name","value":"snapshots"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SnapshotDetailsFragment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SnapshotDetailsFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SnapshotNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"shared"}},{"kind":"Field","name":{"kind":"Name","value":"created"}},{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"mine"}}]}}]} as unknown as DocumentNode; -export const ModuleSolutionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ModuleSolutions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"module"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"solutionsEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const ModuleLevelFragmentFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ModuleLevelFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ModuleLevelNode' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'filterAttributeType' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const SnapshotListItemFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'SnapshotListItem' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'SnapshotNode' } }, + selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'shared' } }] }, + }, + ], +} as unknown as DocumentNode; +export const SnapshotTitleFragmentFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'SnapshotTitleFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'SnapshotNode' } }, + selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'title' } }] }, + }, + ], +} as unknown as DocumentNode; +export const SnapshotDetailsFragmentFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'SnapshotDetailsFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'SnapshotNode' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'title' } }, + { kind: 'Field', name: { kind: 'Name', value: 'shared' } }, + { kind: 'Field', name: { kind: 'Name', value: 'created' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creator' } }, + { kind: 'Field', name: { kind: 'Name', value: 'mine' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const LanguageQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'LanguageQuery' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'me' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'language' }, + directives: [{ kind: 'Directive', name: { kind: 'Name', value: 'client' } }], + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const SetLanguageDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'SetLanguage' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'language' } }, + type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'setLanguage' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'language' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'language' } }, + }, + ], + directives: [{ kind: 'Directive', name: { kind: 'Name', value: 'client' } }], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'language' } }], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ReadOnlyQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ReadOnlyQuery' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'me' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'readOnly' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'selectedClass' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'readOnly' } }], + }, + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ModuleFilterQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ModuleFilterQuery' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'moduleLevels' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ModuleLevelFragment' } }], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'moduleCategories' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'filterAttributeType' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'me' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'language' }, + directives: [{ kind: 'Directive', name: { kind: 'Name', value: 'client' } }], + }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ModuleLevelFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ModuleLevelNode' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'filterAttributeType' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const UpdateLastModuleLevelMutationDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'mutation', + name: { kind: 'Name', value: 'UpdateLastModuleLevelMutation' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'input' } }, + type: { + kind: 'NonNullType', + type: { kind: 'NamedType', name: { kind: 'Name', value: 'UpdateLastModuleLevelInput' } }, + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'updateLastModuleLevel' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'input' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'input' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'clientMutationId' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'user' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'username' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'lastModuleLevel' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'ModuleLevelFragment' } }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ModuleLevelFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ModuleLevelNode' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'filterAttributeType' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ModuleTitleQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ModuleTitleQuery' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'module' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'slug' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'title' } }], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ModuleEditModeQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ModuleEditModeQuery' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'module' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'slug' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'inEditMode' }, + directives: [{ kind: 'Directive', name: { kind: 'Name', value: 'client' } }], + }, + { kind: 'Field', name: { kind: 'Name', value: 'slug' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ChapterQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ChapterQuery' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'chapter' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'id' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'path' } }], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ContentBlockQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ContentBlockQuery' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'contentBlock' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'id' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'path' } }], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const MeLanguageDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'MeLanguage' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'me' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'language' }, + directives: [{ kind: 'Directive', name: { kind: 'Name', value: 'client' } }], + }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ModuleSnapshotsQueryDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ModuleSnapshotsQuery' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'module' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'slug' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'title' } }, + { kind: 'Field', name: { kind: 'Name', value: 'metaTitle' } }, + { kind: 'Field', name: { kind: 'Name', value: 'slug' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'topic' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'Field', name: { kind: 'Name', value: 'title' } }], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'snapshots' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'SnapshotDetailsFragment' } }], + }, + }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'SnapshotDetailsFragment' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'SnapshotNode' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'id' } }, + { kind: 'Field', name: { kind: 'Name', value: 'title' } }, + { kind: 'Field', name: { kind: 'Name', value: 'shared' } }, + { kind: 'Field', name: { kind: 'Name', value: 'created' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creator' } }, + { kind: 'Field', name: { kind: 'Name', value: 'mine' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const ModuleSolutionsDocument = { + kind: 'Document', + definitions: [ + { + kind: 'OperationDefinition', + operation: 'query', + name: { kind: 'Name', value: 'ModuleSolutions' }, + variableDefinitions: [ + { + kind: 'VariableDefinition', + variable: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'Field', + name: { kind: 'Name', value: 'module' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'slug' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'slug' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'solutionsEnabled' } }, + { kind: 'Field', name: { kind: 'Name', value: 'slug' } }, + ], + }, + }, + ], + }, + }, + ], +} as unknown as DocumentNode; diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index 9d8982be..d9f16d27 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -119,19 +119,17 @@ import DUPLICATE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/duplicateC import CHAPTER_QUERY from '@/graphql/gql/queries/chapterQuery.gql'; import DELETE_CONTENT_BLOCK_MUTATION from '@/graphql/gql/mutations/deleteContentBlock.gql'; -import type { ContentBlock } from '@/@types'; +import type { ExtendedContentBlockNode } from '@/@types'; import type { Modal } from '@/plugins/modal.types'; import { PAGE_LOAD_TIMEOUT } from '@/consts/navigation.consts'; export interface Props { - contentBlock: ContentBlock; + contentBlock: ExtendedContentBlockNode; parent?: any; editMode?: boolean; } -const ContentComponent = defineAsyncComponent( - () => import(/* webpackChunkName: "content-components" */ '@/components/content-blocks/ContentComponent.vue') -); +const ContentComponent = defineAsyncComponent(() => import('@/components/content-blocks/ContentComponent.vue')); const { me, schoolClass } = getMe(); @@ -167,7 +165,9 @@ const { mutate: duplicateContentBlock } = useMutation(DUPLICATE_CONTENT_BLOCK_MU id, }; const { chapter }: any = store.readQuery({ query, variables }); - const index = chapter.contentBlocks.findIndex((contentBlock: ContentBlock) => contentBlock.id === contentBlockId); + const index = chapter.contentBlocks.findIndex( + (contentBlock: ExtendedContentBlockNode) => contentBlock.id === contentBlockId + ); const contentBlocks = insertAtIndex(chapter.contentBlocks, index, contentBlock); const data = { chapter: { @@ -201,7 +201,7 @@ const { mutate: doDeleteContentBlock } = useMutation(DELETE_CONTENT_BLOCK_MUTATI }; const { chapter }: any = store.readQuery({ query, variables }); const index = chapter.contentBlocks.findIndex( - (contentBlock: ContentBlock) => contentBlock.id === props.contentBlock.id + (contentBlock: ExtendedContentBlockNode) => contentBlock.id === props.contentBlock.id ); if (index < 0) { throw Error('ContentBlock not found'); diff --git a/client/src/helpers/visibility.ts b/client/src/helpers/visibility.ts index 654eefaa..94529e0a 100644 --- a/client/src/helpers/visibility.ts +++ b/client/src/helpers/visibility.ts @@ -69,9 +69,9 @@ export const hidden: (options: { userCreated: boolean; visibleFor: any[]; hiddenFor: any[]; - titleHiddenFor: any[]; - descriptionHiddenFor: any[]; - hidden: boolean; + titleHiddenFor?: any[]; + descriptionHiddenFor?: any[]; + hidden?: boolean; }; schoolClass: any; }) => boolean = ({ @@ -79,25 +79,25 @@ export const hidden: (options: { block: { userCreated, visibleFor, hiddenFor, titleHiddenFor, descriptionHiddenFor, hidden }, schoolClass, }) => { - if (hidden === true) { - return true; - } - switch (type) { - case CONTENT_TYPE: - case OBJECTIVE_TYPE: - // is this content block / objective group user created? - return userCreated - ? // if so, is visibility not explicitly set for this school class? + if (hidden === true) { + return true; + } + switch (type) { + case CONTENT_TYPE: + case OBJECTIVE_TYPE: + // is this content block / objective group user created? + return userCreated + ? // if so, is visibility not explicitly set for this school class? !containsClass(visibleFor, schoolClass) - : // otherwise, is it explicitly hidden for this school class? + : // otherwise, is it explicitly hidden for this school class? containsClass(hiddenFor, schoolClass); - case OBJECTIVE_GROUP_TYPE: - return containsClass(hiddenFor, schoolClass); - case CHAPTER_TITLE_TYPE: - return containsClass(titleHiddenFor, schoolClass); - case CHAPTER_DESCRIPTION_TYPE: - return containsClass(descriptionHiddenFor, schoolClass); - default: - return false; - } - }; + case OBJECTIVE_GROUP_TYPE: + return containsClass(hiddenFor, schoolClass); + case CHAPTER_TITLE_TYPE: + return containsClass(titleHiddenFor, schoolClass); + case CHAPTER_DESCRIPTION_TYPE: + return containsClass(descriptionHiddenFor, schoolClass); + default: + return false; + } +}; diff --git a/server/books/schema/interfaces/contentblock.py b/server/books/schema/interfaces/contentblock.py index a2f1d41a..872f4a21 100644 --- a/server/books/schema/interfaces/contentblock.py +++ b/server/books/schema/interfaces/contentblock.py @@ -7,7 +7,7 @@ from api.graphene_wagtail import GenericStreamFieldType class ContentBlockInterface(graphene.Interface): title = graphene.String() contents = GenericStreamFieldType() - type = graphene.String() + type = graphene.String(required=True) @staticmethod def resolve_type(parent, info, **kwargs): diff --git a/server/schema-public.graphql b/server/schema-public.graphql index 047eba31..6cb9dcc0 100644 --- a/server/schema-public.graphql +++ b/server/schema-public.graphql @@ -3,10 +3,89 @@ schema { mutation: PublicMutation } -input BetaLoginInput { - usernameInput: String - passwordInput: String - clientMutationId: String +type PublicQuery { + node( + """The ID of the object""" + id: ID! + ): Node + _debug: DjangoDebug +} + +"""An object with an ID""" +interface Node { + """The ID of the object""" + id: ID! +} + +"""Debugging information for the current query.""" +type DjangoDebug { + """Executed SQL queries for this API query.""" + sql: [DjangoDebugSQL] + + """Raise exceptions for this API query.""" + exceptions: [DjangoDebugException] +} + +"""Represents a single database query made to a Django managed DB.""" +type DjangoDebugSQL { + """The type of database being used (e.g. postrgesql, mysql, sqlite).""" + vendor: String! + + """The Django database alias (e.g. 'default').""" + alias: String! + + """The actual SQL sent to this database.""" + sql: String + + """Duration of this database query in seconds.""" + duration: Float! + + """The raw SQL of this query, without params.""" + rawSql: String! + + """JSON encoded database query parameters.""" + params: String! + + """Start time of this database query.""" + startTime: Float! + + """Stop time of this database query.""" + stopTime: Float! + + """Whether this database query took more than 10 seconds.""" + isSlow: Boolean! + + """Whether this database query was a SELECT.""" + isSelect: Boolean! + + """Postgres transaction ID if available.""" + transId: String + + """Postgres transaction status if available.""" + transStatus: String + + """Postgres isolation level if available.""" + isoLevel: String + + """Postgres connection encoding if available.""" + encoding: String +} + +"""Represents a single exception raised.""" +type DjangoDebugException { + """The class of the exception""" + excType: String! + + """The message of the exception""" + message: String! + + """The stack trace""" + stack: String! +} + +type PublicMutation { + betaLogin(input: BetaLoginInput!): BetaLoginPayload + _debug: DjangoDebug } type BetaLoginPayload { @@ -15,37 +94,8 @@ type BetaLoginPayload { clientMutationId: String } -type DjangoDebug { - sql: [DjangoDebugSQL] -} - -type DjangoDebugSQL { - vendor: String! - alias: String! - sql: String - duration: Float! - rawSql: String! - params: String! - startTime: Float! - stopTime: Float! - isSlow: Boolean! - isSelect: Boolean! - transId: String - transStatus: String - isoLevel: String - encoding: String -} - -interface Node { - id: ID! -} - -type PublicMutation { - betaLogin(input: BetaLoginInput!): BetaLoginPayload - _debug: DjangoDebug -} - -type PublicQuery { - node(id: ID!): Node - _debug: DjangoDebug -} +input BetaLoginInput { + usernameInput: String + passwordInput: String + clientMutationId: String +} \ No newline at end of file diff --git a/server/schema.graphql b/server/schema.graphql index 3ec25054..3f9887f5 100644 --- a/server/schema.graphql +++ b/server/schema.graphql @@ -1,204 +1,241 @@ -schema { - query: Query - mutation: Mutation +type Query { + newsTeasers: [NewsTeaserNode] + survey(id: ID): SurveyNode + surveys(offset: Int, before: String, after: String, first: Int, last: Int): SurveyNodeConnection + project(id: ID, slug: String): ProjectNode + projects: [ProjectNode] + instrument(slug: String, id: ID): InstrumentNode + instruments: [InstrumentNode] + instrumentTypes: [InstrumentTypeNode] + instrumentCategories: [InstrumentCategoryNode] + studentSubmission(id: ID!): StudentSubmissionNode + assignment( + """The ID of the object""" + id: ID! + ): AssignmentNode + assignments: [AssignmentNode] + node( + """The ID of the object""" + id: ID! + ): Node + topic(slug: String): TopicOr404Node + module(slug: String, id: ID): ModuleNode + chapter( + """The ID of the object""" + id: ID! + ): ChapterNode + contentBlock( + """The ID of the object""" + id: ID! + ): ContentBlockNode + snapshot( + """The ID of the object""" + id: ID! + ): SnapshotNode + topics(before: String, after: String, first: Int, last: Int): TopicConnection + modules(before: String, after: String, first: Int, last: Int): ModuleConnection + chapters(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, title: String): ChapterNodeConnection + moduleLevel(id: ID!): ModuleLevelNode + moduleLevels: [ModuleLevelNode] + moduleCategory(id: ID!): ModuleCategoryNode + moduleCategories: [ModuleCategoryNode] + objectiveGroup( + """The ID of the object""" + id: ID! + ): ObjectiveGroupNode + objectiveGroups(offset: Int, before: String, after: String, first: Int, last: Int, title: ObjectivesObjectiveGroupTitleChoices, module_Slug: String): ObjectiveGroupNodeConnection + roomEntry(id: ID, slug: String): RoomEntryNode + room(slug: String, id: ID, appearance: String): RoomNode + rooms: [RoomNode] + allRoomEntries(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): RoomEntryNodeConnection + moduleRoom(slug: String, classId: ID): RoomNode + me: PrivateUserNode + allUsers(offset: Int, before: String, after: String, first: Int, last: Int, username: String, email: String): PrivateUserNodeConnection + myActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection + myInstrumentActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): InstrumentNodeConnection + _debug: DjangoDebug } -input AddCommentInput { - comment: String! - roomEntry: ID! - clientMutationId: String -} - -type AddCommentPayload { - success: Boolean - comment: CommentNode - clientMutationId: String -} - -input AddContentBlockInput { - contentBlock: ContentBlockInput - parent: ID - after: ID - clientMutationId: String -} - -type AddContentBlockPayload { - newContentBlock: ContentBlockNode - errors: [String] - clientMutationId: String -} - -input AddModuleRoomEntryArgument { - title: String! - contents: [ContentElementInput] - roomSlug: String! - schoolClass: String! -} - -input AddModuleRoomEntryInput { - roomEntry: AddModuleRoomEntryArgument - clientMutationId: String -} - -type AddModuleRoomEntryPayload { - roomEntry: RoomEntryNode - errors: [String] - clientMutationId: String -} - -input AddNoteArgument { - content: UUID - block: String - type: String - parent: ID - text: String! -} - -input AddNoteInput { - note: AddNoteArgument - clientMutationId: String -} - -type AddNotePayload { - note: NoteNode - clientMutationId: String -} - -input AddObjectiveArgument { - text: String! - objectiveGroup: ID -} - -input AddObjectiveInput { - objective: AddObjectiveArgument - clientMutationId: String -} - -type AddObjectivePayload { - objective: ObjectiveNode - clientMutationId: String -} - -input AddProjectArgument { - title: String - description: String - objectives: String - appearance: String -} - -input AddProjectEntryArgument { - description: String - documentUrl: String - project: String! -} - -input AddProjectEntryInput { - projectEntry: AddProjectEntryArgument - clientMutationId: String -} - -type AddProjectEntryPayload { - errors: [String] - projectEntry: ProjectEntryNode - clientMutationId: String -} - -input AddProjectInput { - project: AddProjectArgument - clientMutationId: String -} - -type AddProjectPayload { - errors: [String] - project: ProjectNode - clientMutationId: String -} - -input AddRemoveMemberInput { - member: ID! - schoolClass: ID! - active: Boolean! - clientMutationId: String -} - -type AddRemoveMemberPayload { - success: Boolean - clientMutationId: String -} - -input AddRoomArgument { - title: String - description: String - schoolClass: SchoolClassInput - appearance: String -} - -input AddRoomEntryArgument { - title: String! - contents: [ContentElementInput] - roomSlug: String! -} - -input AddRoomEntryInput { - roomEntry: AddRoomEntryArgument - clientMutationId: String -} - -type AddRoomEntryPayload { - roomEntry: RoomEntryNode - errors: [String] - clientMutationId: String -} - -input AddRoomInput { - room: AddRoomArgument - clientMutationId: String -} - -type AddRoomPayload { - errors: [String] - room: RoomNode - clientMutationId: String -} - -type AnswerNode implements Node { +type NewsTeaserNode implements Node { + """The ID of the object""" id: ID! - owner: PrivateUserNode! + imageUrl: String + title: String! + description: String + date: Date + orderId: Int! + newsArticleUrl: String + imageSource: String! + displayDate: String +} + +"""An object with an ID""" +interface Node { + """The ID of the object""" + id: ID! +} + +""" +The `Date` scalar type represents a Date +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar Date + +type SurveyNode implements Node { + """The ID of the object""" + id: ID! + title: String! + module: ModuleNode data: JSONString! - survey: SurveyNode! + answers(offset: Int, before: String, after: String, first: Int, last: Int): AnswerNodeConnection! pk: Int + answer: AnswerNode } -type AnswerNodeConnection { +type ModuleNode implements ModuleInterface { + """Der Seitentitel, der öffentlich angezeigt werden soll""" + title: String! + + """ + Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ + """ + slug: String! + + """e.g. 'Intro' or 'Modul 1'""" + metaTitle: String! + level: ModuleLevelNode + category: ModuleCategoryNode + heroImage: String! + + """e.g. 'Reuters', 'Wikipedia'""" + heroSource: String! + teaser: String! + intro: String! + assignments: [AssignmentNode] + objectiveGroups: [ObjectiveGroupNode] + + """The ID of the object""" + id: ID! + pk: Int + topic: TopicNode + chapters: [ChapterNode] + solutionsEnabled: Boolean + bookmark: ModuleBookmarkNode + mySubmissions(offset: Int, before: String, after: String, first: Int, last: Int): StudentSubmissionNodeConnection + myAnswers(offset: Int, before: String, after: String, first: Int, last: Int): AnswerNodeConnection + myContentBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ContentBlockBookmarkNodeConnection + myChapterBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ChapterBookmarkNodeConnection + snapshots: [SnapshotNode] + language: String +} + +interface ModuleInterface { + """The ID of the object""" + id: ID! + pk: Int + heroImage: String! + topic: TopicNode +} + +type TopicNode implements Node { + """Der Seitentitel, der öffentlich angezeigt werden soll""" + title: String! + + """ + Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ + """ + slug: String! + + """Order of the topic""" + order: Int! + teaser: String! + description: String! + vimeoId: String + instructions: String + + """The ID of the object""" + id: ID! + pk: Int + modules(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection +} + +type ModuleNodeConnection { + """Pagination data for this connection.""" pageInfo: PageInfo! - edges: [AnswerNodeEdge]! + + """Contains the nodes in this connection.""" + edges: [ModuleNodeEdge]! } -type AnswerNodeEdge { - node: AnswerNode +""" +The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. +""" +type PageInfo { + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + + """When paginating backwards, the cursor to continue.""" + startCursor: String + + """When paginating forwards, the cursor to continue.""" + endCursor: String +} + +"""A Relay edge containing a `ModuleNode` and its cursor.""" +type ModuleNodeEdge { + """The item at the end of the edge""" + node: ModuleNode + + """A cursor for use in pagination""" cursor: String! } -input ApplySnapshotInput { - snapshot: ID! - selectedClass: ID! - clientMutationId: String -} - -type ApplySnapshotPayload { - success: Boolean - module: ModuleNode - clientMutationId: String -} - -input AssignmentInput { +type ModuleLevelNode implements Node { + """The ID of the object""" id: ID! - answer: String! - document: String - final: Boolean + name: String! + filterAttributeType: BooksModuleLevelFilterAttributeTypeChoices! + + """Order in the Dropdown List""" + order: Int! + moduleSet(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection! +} + +"""An enumeration.""" +enum BooksModuleLevelFilterAttributeTypeChoices { + """All""" + ALL + + """Exact""" + EXACT +} + +type ModuleCategoryNode implements Node { + """The ID of the object""" + id: ID! + name: String! + filterAttributeType: BooksModuleCategoryFilterAttributeTypeChoices! + + """Order in the Dropdown List""" + order: Int! + moduleSet(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection! +} + +"""An enumeration.""" +enum BooksModuleCategoryFilterAttributeTypeChoices { + """All""" + ALL + + """Exact""" + EXACT } type AssignmentNode implements Node { + """The ID of the object""" id: ID! created: DateTime! modified: DateTime! @@ -214,50 +251,89 @@ type AssignmentNode implements Node { submission: StudentSubmissionNode } -type ChapterBookmarkNode implements Node { +""" +The `DateTime` scalar type represents a DateTime +value as specified by +[iso8601](https://en.wikipedia.org/wiki/ISO_8601). +""" +scalar DateTime + +type PrivateUserNode implements Node { + firstName: String! + lastName: String! + avatarUrl: String! + + """ + Erforderlich. 150 Zeichen oder weniger. Nur Buchstaben, Ziffern und @/./+/-/_. + """ + username: String! + lastModule: ModuleNode + lastModuleLevel: ModuleLevelNode + lastTopic: TopicNode + email: String! + onboardingVisited: Boolean! + team: TeamNode + schoolClasses: [SchoolClassNode] + + """The ID of the object""" id: ID! - user: PrivateUserNode! - note: NoteNode - chapter: ChapterNode! + pk: Int + permissions: [String] + selectedClass: SchoolClassNode + expiryDate: String + isTeacher: Boolean + oldClasses: [SchoolClassNode] + recentModules( + offset: Int + before: String + after: String + first: Int + last: Int + recentModules: ID + + """Sortierung""" + orderBy: String + ): ModuleNodeConnection + readOnly: Boolean } -type ChapterBookmarkNodeConnection { - pageInfo: PageInfo! - edges: [ChapterBookmarkNodeEdge]! -} - -type ChapterBookmarkNodeEdge { - node: ChapterBookmarkNode - cursor: String! -} - -interface ChapterInterface { - description: String - title: String -} - -type ChapterNode implements Node & ChapterInterface { - title: String - slug: String! - description: String - titleHiddenFor: [SchoolClassNode] - descriptionHiddenFor: [SchoolClassNode] +type TeamNode implements Node { + """The ID of the object""" id: ID! - bookmark: ChapterBookmarkNode - contentBlocks: [ContentBlockNode] - path: String + name: String! + isDeleted: Boolean! + code: String + creator: PrivateUserNode + members: [PublicUserNode] + pk: Int } -type ChapterNodeConnection { - pageInfo: PageInfo! - edges: [ChapterNodeEdge]! +type PublicUserNode implements Node { + firstName: String! + lastName: String! + avatarUrl: String! + + """The ID of the object""" + id: ID! + fullName: String! + isMe: Boolean } -type ChapterNodeEdge { - node: ChapterNode - cursor: String! +type SchoolClassNode implements Node { + name: String! + code: String + + """The ID of the object""" + id: ID! + pk: Int + members: [ClassMemberNode] + readOnly: Boolean } +""" +We need to build this ourselves, because we want the active property on the node, because providing it on the +Connection or Edge for a UserNodeConnection is difficult. +""" type ClassMemberNode { user: PublicUserNode active: Boolean @@ -268,52 +344,167 @@ type ClassMemberNode { isMe: Boolean } -type CommentNode implements Node { - text: String! - owner: PublicUserNode +type StudentSubmissionNode implements Node { + """The ID of the object""" + id: ID! created: DateTime! + modified: DateTime! + text: String! + document: String! + assignment: AssignmentNode! + student: PrivateUserNode! + final: Boolean! + submissionFeedback: SubmissionFeedbackNode +} + +type SubmissionFeedbackNode implements Node { + created: DateTime! + modified: DateTime! + text: String! + teacher: PrivateUserNode! + studentSubmission: StudentSubmissionNode! + final: Boolean! + + """The ID of the object""" id: ID! } -type ContentBlockBookmarkNode implements Node { +type ObjectiveGroupNode implements Node { + """The ID of the object""" id: ID! - user: PrivateUserNode! - note: NoteNode - uuid: UUID - contentBlock: ContentBlockNode! + title: ObjectivesObjectiveGroupTitleChoices + module: ModuleNode! + hiddenFor: [SchoolClassNode] + objectives: [ObjectiveNode] + pk: Int + displayTitle: String } -type ContentBlockBookmarkNodeConnection { +"""An enumeration.""" +enum ObjectivesObjectiveGroupTitleChoices { + """Sprache & Kommunikation""" + LANGUAGE_COMMUNICATION + + """Gesellschaft""" + SOCIETY + + """Überfachliche Lernziele""" + INTERDISCIPLINARY +} + +type ObjectiveNode implements Node { + """The ID of the object""" + id: ID! + text: String! + group: ObjectiveGroupNode! + owner: PrivateUserNode + hiddenFor: [SchoolClassNode] + visibleFor: [SchoolClassNode] + order: Int + hiddenForSnapshots(offset: Int, before: String, after: String, first: Int, last: Int): SnapshotNodeConnection! + pk: Int + userCreated: Boolean + mine: Boolean +} + +type SnapshotNodeConnection { + """Pagination data for this connection.""" pageInfo: PageInfo! - edges: [ContentBlockBookmarkNodeEdge]! + + """Contains the nodes in this connection.""" + edges: [SnapshotNodeEdge]! } -type ContentBlockBookmarkNodeEdge { - node: ContentBlockBookmarkNode +"""A Relay edge containing a `SnapshotNode` and its cursor.""" +type SnapshotNodeEdge { + """The item at the end of the edge""" + node: SnapshotNode + + """A cursor for use in pagination""" cursor: String! } -input ContentBlockInput { +type SnapshotNode implements Node { + """The ID of the object""" + 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 - type: String - contents: [ContentElementInput] - visibility: [UserGroupBlockVisibility] + metaTitle: String + heroImage: String + changes: SnapshotChangesNode + mine: Boolean +} + +type SnapshotChapterNode implements Node & ChapterInterface { + """The ID of the object""" + id: ID! + description: String + title: String + contentBlocks: [SnapshotContentBlockNode] + descriptionHidden: Boolean + titleHidden: Boolean +} + +interface ChapterInterface { + description: String + title: String +} + +type SnapshotContentBlockNode implements Node & ContentBlockInterface { + """The ID of the object""" + id: ID! + title: String + contents: GenericStreamFieldType + type: String! + hidden: Boolean } interface ContentBlockInterface { title: String contents: GenericStreamFieldType - type: String + type: String! +} + +scalar GenericStreamFieldType + +type ContentBlockNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [ContentBlockNodeEdge]! +} + +"""A Relay edge containing a `ContentBlockNode` and its cursor.""" +type ContentBlockNodeEdge { + """The item at the end of the edge""" + node: ContentBlockNode + + """A cursor for use in pagination""" + cursor: String! } type ContentBlockNode implements Node & ContentBlockInterface { title: String + + """ + Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ + """ slug: String! hiddenFor: [SchoolClassNode] visibleFor: [SchoolClassNode] userCreated: Boolean! contents: GenericStreamFieldType - type: String + type: String! + + """The ID of the object""" id: ID! mine: Boolean bookmarks: [ContentBlockBookmarkNode] @@ -322,297 +513,24 @@ type ContentBlockNode implements Node & ContentBlockInterface { path: String } -type ContentBlockNodeConnection { - pageInfo: PageInfo! - edges: [ContentBlockNodeEdge]! -} - -type ContentBlockNodeEdge { - node: ContentBlockNode - cursor: String! -} - -input ContentElementInput { - id: String - type: InputTypes! - value: ContentElementValueInput - contents: [ContentElementInput] -} - -input ContentElementValueInput { - text: String - url: String - description: String - title: String - assignment: String - id: String -} - -input CouponInput { - couponCode: String - clientMutationId: String -} - -type CouponPayload { - result: RedeemCouponResult - clientMutationId: String -} - -input CreateSchoolClassInput { - name: String - clientMutationId: String -} - -type CreateSchoolClassPayload { - result: CreateSchoolClassResult - clientMutationId: String -} - -union CreateSchoolClassResult = SchoolClassNode | DuplicateName - -input CreateSnapshotInput { - module: String! - selectedClass: ID! - clientMutationId: String -} - -type CreateSnapshotPayload { - snapshot: SnapshotNode - success: Boolean - clientMutationId: String -} - -input CreateTeamInput { - name: String! - clientMutationId: String -} - -type CreateTeamPayload { - result: CreateTeamResult - clientMutationId: String -} - -union CreateTeamResult = TeamNode | DuplicateName - -scalar Date - -scalar DateTime - -input DeleteContentBlockInput { - id: ID! - clientMutationId: String -} - -type DeleteContentBlockPayload { - success: Boolean - errors: String - clientMutationId: String -} - -input DeleteObjectiveInput { - id: ID! - clientMutationId: String -} - -type DeleteObjectivePayload { - success: Boolean - clientMutationId: String -} - -input DeleteProjectEntryInput { - id: ID! - clientMutationId: String -} - -type DeleteProjectEntryPayload { - success: Boolean - errors: [String] - clientMutationId: String -} - -input DeleteProjectInput { - slug: String! - clientMutationId: String -} - -type DeleteProjectPayload { - success: Boolean - errors: [String] - clientMutationId: String -} - -input DeleteRoomEntryInput { - slug: String! - clientMutationId: String -} - -type DeleteRoomEntryPayload { - success: Boolean - roomSlug: String - roomId: ID - errors: [String] - clientMutationId: String -} - -input DeleteRoomInput { - id: ID! - clientMutationId: String -} - -type DeleteRoomPayload { - success: Boolean - errors: [String] - clientMutationId: String -} - -input DeleteSnapshotInput { - id: ID! - clientMutationId: String -} - -type DeleteSnapshotPayload { - result: DeleteSnapshotResult - clientMutationId: String -} - -union DeleteSnapshotResult = Success | NotOwner - -type DjangoDebug { - sql: [DjangoDebugSQL] -} - -type DjangoDebugSQL { - vendor: String! - alias: String! - sql: String - duration: Float! - rawSql: String! - params: String! - startTime: Float! - stopTime: Float! - isSlow: Boolean! - isSelect: Boolean! - transId: String - transStatus: String - isoLevel: String - encoding: String -} - -input DuplicateContentBlockInput { - id: ID! - clientMutationId: String -} - -type DuplicateContentBlockPayload { - contentBlock: ContentBlockNode - clientMutationId: String -} - -type DuplicateName implements FailureNode { - reason: String -} - -interface FailureNode { - reason: String -} - -type FieldError { - code: String -} - -scalar GenericStreamFieldType - -enum InputTypes { - text_block - assignment - image_block - image_url_block - link_block - video_block - document_block - content_list_item - subtitle - readonly -} - -type InstrumentBookmarkNode implements Node { +type ContentBlockBookmarkNode implements Node { + """The ID of the object""" id: ID! user: PrivateUserNode! note: NoteNode uuid: UUID - instrument: InstrumentNode! + contentBlock: ContentBlockNode! } -type InstrumentCategoryNode implements Node { +type NoteNode implements Node { + """The ID of the object""" id: ID! - name: String! - background: String! - foreground: String! - types: [InstrumentTypeNode] -} - -type InstrumentNode implements Node { - title: String! - slug: String! - intro: String! - contents: GenericStreamFieldType - id: ID! - bookmarks: [InstrumentBookmarkNode] - type: InstrumentTypeNode - language: String -} - -type InstrumentNodeConnection { - pageInfo: PageInfo! - edges: [InstrumentNodeEdge]! -} - -type InstrumentNodeEdge { - node: InstrumentNode - cursor: String! -} - -type InstrumentTypeNode implements Node { - id: ID! - name: String! - category: InstrumentCategoryNode - type: String! -} - -type InvalidCoupon implements FailureNode { - reason: String -} - -scalar JSONString - -input JoinClassInput { - code: String! - clientMutationId: String -} - -type JoinClassPayload { - success: Boolean - schoolClass: SchoolClassNode - clientMutationId: String -} - -input JoinTeamInput { - code: String! - clientMutationId: String -} - -type JoinTeamPayload { - success: Boolean - team: TeamNode - clientMutationId: String -} - -type LeaveTeam { - success: Boolean -} - -type Logout { - success: Boolean + text: String! + contentblockbookmark: ContentBlockBookmarkNode + modulebookmark: ModuleBookmarkNode + chapterbookmark: ChapterBookmarkNode + instrumentbookmark: InstrumentBookmarkNode + pk: Int } type ModuleBookmarkNode { @@ -622,93 +540,481 @@ type ModuleBookmarkNode { module: ModuleNode! } -enum ModuleCategoryFilterAttributeType { - ALL - EXACT +type ChapterBookmarkNode implements Node { + """The ID of the object""" + id: ID! + user: PrivateUserNode! + note: NoteNode + chapter: ChapterNode! } -type ModuleCategoryNode implements Node { +type ChapterNode implements Node & ChapterInterface { + title: String + + """ + Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ + """ + slug: String! + description: String + titleHiddenFor: [SchoolClassNode] + descriptionHiddenFor: [SchoolClassNode] + + """The ID of the object""" + id: ID! + bookmark: ChapterBookmarkNode + contentBlocks: [ContentBlockNode] + path: String +} + +type InstrumentBookmarkNode implements Node { + """The ID of the object""" + id: ID! + user: PrivateUserNode! + note: NoteNode + uuid: UUID + instrument: InstrumentNode! +} + +""" +Leverages the internal Python implementation of UUID (uuid.UUID) to provide native UUID objects +in fields, resolvers and input. +""" +scalar UUID + +type InstrumentNode implements Node { + """Der Seitentitel, der öffentlich angezeigt werden soll""" + title: String! + + """ + Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ + """ + slug: String! + intro: String! + contents: GenericStreamFieldType + + """The ID of the object""" + id: ID! + bookmarks: [InstrumentBookmarkNode] + type: InstrumentTypeNode + language: String +} + +type InstrumentTypeNode implements Node { + """The ID of the object""" id: ID! name: String! - filterAttributeType: ModuleCategoryFilterAttributeType! - moduleSet(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection! + category: InstrumentCategoryNode + type: String! +} + +type InstrumentCategoryNode implements Node { + """The ID of the object""" + id: ID! + name: String! + background: String! + foreground: String! + types: [InstrumentTypeNode] +} + +type SnapshotObjectiveGroupNode implements Node { + """The ID of the object""" + id: ID! + title: String! + hidden: Boolean! + displayTitle: String! + objectives: [SnapshotObjectiveNode]! +} + +type SnapshotObjectiveNode implements Node { + """The ID of the object""" + id: ID! + hidden: Boolean! + text: String! +} + +type ObjectiveNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [ObjectiveNodeEdge]! +} + +"""A Relay edge containing a `ObjectiveNode` and its cursor.""" +type ObjectiveNodeEdge { + """The item at the end of the edge""" + node: ObjectiveNode + + """A cursor for use in pagination""" + cursor: String! +} + +type SnapshotChangesNode { + hiddenObjectives: Int! + newObjectives: Int! + hiddenContentBlocks: Int! + newContentBlocks: Int! +} + +type StudentSubmissionNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [StudentSubmissionNodeEdge]! +} + +"""A Relay edge containing a `StudentSubmissionNode` and its cursor.""" +type StudentSubmissionNodeEdge { + """The item at the end of the edge""" + node: StudentSubmissionNode + + """A cursor for use in pagination""" + cursor: String! +} + +type AnswerNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [AnswerNodeEdge]! +} + +"""A Relay edge containing a `AnswerNode` and its cursor.""" +type AnswerNodeEdge { + """The item at the end of the edge""" + node: AnswerNode + + """A cursor for use in pagination""" + cursor: String! +} + +type AnswerNode implements Node { + """The ID of the object""" + id: ID! + owner: PrivateUserNode! + data: JSONString! + survey: SurveyNode! + pk: Int +} + +""" +Allows use of a JSON String for input / output from the GraphQL schema. + +Use of this type is *not recommended* as you lose the benefits of having a defined, static +schema (one of the key benefits of GraphQL). +""" +scalar JSONString + +type ContentBlockBookmarkNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [ContentBlockBookmarkNodeEdge]! +} + +"""A Relay edge containing a `ContentBlockBookmarkNode` and its cursor.""" +type ContentBlockBookmarkNodeEdge { + """The item at the end of the edge""" + node: ContentBlockBookmarkNode + + """A cursor for use in pagination""" + cursor: String! +} + +type ChapterBookmarkNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [ChapterBookmarkNodeEdge]! +} + +"""A Relay edge containing a `ChapterBookmarkNode` and its cursor.""" +type ChapterBookmarkNodeEdge { + """The item at the end of the edge""" + node: ChapterBookmarkNode + + """A cursor for use in pagination""" + cursor: String! +} + +type SurveyNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [SurveyNodeEdge]! +} + +"""A Relay edge containing a `SurveyNode` and its cursor.""" +type SurveyNodeEdge { + """The item at the end of the edge""" + node: SurveyNode + + """A cursor for use in pagination""" + cursor: String! +} + +type ProjectNode implements Node { + """The ID of the object""" + id: ID! + title: String! + description: String + slug: String! + objectives: String! + appearance: String! + student: PrivateUserNode! + final: Boolean! + schoolClass: SchoolClassNode + entries: [ProjectEntryNode] + pk: Int + entriesCount: Int + owner: PublicUserNode +} + +type ProjectEntryNode implements Node { + documentUrl: String! + description: String! + created: DateTime! + project: ProjectNode! + + """The ID of the object""" + id: ID! +} + +union TopicOr404Node = TopicNode | NotFound + +type NotFound { + reason: String +} + +type TopicConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [TopicEdge]! + nodes: [TopicNode] +} + +"""A Relay edge containing a `Topic` and its cursor.""" +type TopicEdge { + """The item at the end of the edge""" + node: TopicNode + + """A cursor for use in pagination""" + cursor: String! } type ModuleConnection { + """Pagination data for this connection.""" pageInfo: PageInfo! + + """Contains the nodes in this connection.""" edges: [ModuleEdge]! nodes: [ModuleNode] } +"""A Relay edge containing a `Module` and its cursor.""" type ModuleEdge { + """The item at the end of the edge""" node: ModuleNode + + """A cursor for use in pagination""" cursor: String! } -interface ModuleInterface { - id: ID! - pk: Int - heroImage: String! - topic: TopicNode -} - -enum ModuleLevelFilterAttributeType { - ALL - EXACT -} - -type ModuleLevelNode implements Node { - id: ID! - name: String! - filterAttributeType: ModuleLevelFilterAttributeType! - moduleSet(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection! -} - -type ModuleNode implements ModuleInterface { - title: String! - slug: String! - metaTitle: String! - level: ModuleLevelNode - category: ModuleCategoryNode - heroImage: String! - heroSource: String! - teaser: String! - intro: String! - assignments: [AssignmentNode] - objectiveGroups: [ObjectiveGroupNode] - id: ID! - pk: Int - topic: TopicNode - chapters: [ChapterNode] - solutionsEnabled: Boolean - bookmark: ModuleBookmarkNode - mySubmissions(offset: Int, before: String, after: String, first: Int, last: Int): StudentSubmissionNodeConnection - myAnswers(offset: Int, before: String, after: String, first: Int, last: Int): AnswerNodeConnection - myContentBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ContentBlockBookmarkNodeConnection - myChapterBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ChapterBookmarkNodeConnection - snapshots: [SnapshotNode] - language: String -} - -type ModuleNodeConnection { +type ChapterNodeConnection { + """Pagination data for this connection.""" pageInfo: PageInfo! - edges: [ModuleNodeEdge]! + + """Contains the nodes in this connection.""" + edges: [ChapterNodeEdge]! } -type ModuleNodeEdge { - node: ModuleNode +"""A Relay edge containing a `ChapterNode` and its cursor.""" +type ChapterNodeEdge { + """The item at the end of the edge""" + node: ChapterNode + + """A cursor for use in pagination""" cursor: String! } -input MutateContentBlockInput { - id: ID! - contentBlock: ContentBlockInput - clientMutationId: String +type ObjectiveGroupNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [ObjectiveGroupNodeEdge]! } -type MutateContentBlockPayload { - contentBlock: ContentBlockNode - clientMutationId: String +"""A Relay edge containing a `ObjectiveGroupNode` and its cursor.""" +type ObjectiveGroupNodeEdge { + """The item at the end of the edge""" + node: ObjectiveGroupNode + + """A cursor for use in pagination""" + cursor: String! +} + +type RoomEntryNode implements Node { + """The ID of the object""" + id: ID! + title: String! + description: String + slug: String! + room: RoomNode! + author: PublicUserNode + + """""" + contents: GenericStreamFieldType + comments: [CommentNode] + pk: Int +} + +type RoomNode implements Node { + """The ID of the object""" + id: ID! + title: String! + description: String + slug: String! + schoolClass: SchoolClassNode! + appearance: String! + userCreated: Boolean! + restricted: Boolean! + roomEntries(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): RoomEntryNodeConnection! + pk: Int + entryCount: Int +} + +type RoomEntryNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [RoomEntryNodeEdge]! +} + +"""A Relay edge containing a `RoomEntryNode` and its cursor.""" +type RoomEntryNodeEdge { + """The item at the end of the edge""" + node: RoomEntryNode + + """A cursor for use in pagination""" + cursor: String! +} + +type CommentNode implements Node { + text: String! + owner: PublicUserNode + created: DateTime! + + """The ID of the object""" + id: ID! +} + +type PrivateUserNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [PrivateUserNodeEdge]! +} + +"""A Relay edge containing a `PrivateUserNode` and its cursor.""" +type PrivateUserNodeEdge { + """The item at the end of the edge""" + node: PrivateUserNode + + """A cursor for use in pagination""" + cursor: String! +} + +type InstrumentNodeConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + + """Contains the nodes in this connection.""" + edges: [InstrumentNodeEdge]! +} + +"""A Relay edge containing a `InstrumentNode` and its cursor.""" +type InstrumentNodeEdge { + """The item at the end of the edge""" + node: InstrumentNode + + """A cursor for use in pagination""" + cursor: String! +} + +"""Debugging information for the current query.""" +type DjangoDebug { + """Executed SQL queries for this API query.""" + sql: [DjangoDebugSQL] + + """Raise exceptions for this API query.""" + exceptions: [DjangoDebugException] +} + +"""Represents a single database query made to a Django managed DB.""" +type DjangoDebugSQL { + """The type of database being used (e.g. postrgesql, mysql, sqlite).""" + vendor: String! + + """The Django database alias (e.g. 'default').""" + alias: String! + + """The actual SQL sent to this database.""" + sql: String + + """Duration of this database query in seconds.""" + duration: Float! + + """The raw SQL of this query, without params.""" + rawSql: String! + + """JSON encoded database query parameters.""" + params: String! + + """Start time of this database query.""" + startTime: Float! + + """Stop time of this database query.""" + stopTime: Float! + + """Whether this database query took more than 10 seconds.""" + isSlow: Boolean! + + """Whether this database query was a SELECT.""" + isSelect: Boolean! + + """Postgres transaction ID if available.""" + transId: String + + """Postgres transaction status if available.""" + transStatus: String + + """Postgres isolation level if available.""" + isoLevel: String + + """Postgres connection encoding if available.""" + encoding: String +} + +"""Represents a single exception raised.""" +type DjangoDebugException { + """The class of the exception""" + excType: String! + + """The message of the exception""" + message: String! + + """The stack trace""" + stack: String! } type Mutation { @@ -774,343 +1080,6 @@ type Mutation { _debug: DjangoDebug } -type NewsTeaserNode implements Node { - id: ID! - imageUrl: String - title: String! - description: String - date: Date - orderId: Int! - newsArticleUrl: String - imageSource: String! - displayDate: String -} - -interface Node { - id: ID! -} - -type NotFound { - reason: String -} - -type NotOwner implements FailureNode { - reason: String -} - -type NoteNode implements Node { - id: ID! - text: String! - contentblockbookmark: ContentBlockBookmarkNode - modulebookmark: ModuleBookmarkNode - chapterbookmark: ChapterBookmarkNode - instrumentbookmark: InstrumentBookmarkNode - pk: Int -} - -type ObjectiveGroupNode implements Node { - id: ID! - title: ObjectiveGroupTitle - module: ModuleNode! - hiddenFor: [SchoolClassNode] - objectives: [ObjectiveNode] - pk: Int - displayTitle: String -} - -type ObjectiveGroupNodeConnection { - pageInfo: PageInfo! - edges: [ObjectiveGroupNodeEdge]! -} - -type ObjectiveGroupNodeEdge { - node: ObjectiveGroupNode - cursor: String! -} - -enum ObjectiveGroupTitle { - LANGUAGE_COMMUNICATION - SOCIETY - INTERDISCIPLINARY -} - -type ObjectiveNode implements Node { - id: ID! - text: String! - group: ObjectiveGroupNode! - owner: PrivateUserNode - hiddenFor: [SchoolClassNode] - visibleFor: [SchoolClassNode] - order: Int - hiddenForSnapshots(offset: Int, before: String, after: String, first: Int, last: Int): SnapshotNodeConnection! - pk: Int - userCreated: Boolean - mine: Boolean -} - -type ObjectiveNodeConnection { - pageInfo: PageInfo! - edges: [ObjectiveNodeEdge]! -} - -type ObjectiveNodeEdge { - node: ObjectiveNode - cursor: String! -} - -type PageInfo { - hasNextPage: Boolean! - hasPreviousPage: Boolean! - startCursor: String - endCursor: String -} - -input PasswordUpdateInput { - oldPassword: String - newPassword: String -} - -type PrivateUserNode implements Node { - firstName: String! - lastName: String! - avatarUrl: String! - username: String! - lastModule: ModuleNode - lastModuleLevel: ModuleLevelNode - lastTopic: TopicNode - email: String! - onboardingVisited: Boolean! - team: TeamNode - schoolClasses: [SchoolClassNode] - id: ID! - pk: Int - permissions: [String] - selectedClass: SchoolClassNode - expiryDate: String - isTeacher: Boolean - oldClasses: [SchoolClassNode] - recentModules(offset: Int, before: String, after: String, first: Int, last: Int, recentModules: [ID], orderBy: String): ModuleNodeConnection - readOnly: Boolean -} - -type PrivateUserNodeConnection { - pageInfo: PageInfo! - edges: [PrivateUserNodeEdge]! -} - -type PrivateUserNodeEdge { - node: PrivateUserNode - cursor: String! -} - -type ProjectEntryNode implements Node { - documentUrl: String! - description: String! - created: DateTime! - project: ProjectNode! - id: ID! -} - -type ProjectNode implements Node { - id: ID! - title: String! - description: String - slug: String! - objectives: String! - appearance: String! - student: PrivateUserNode! - final: Boolean! - schoolClass: SchoolClassNode - entries: [ProjectEntryNode] - pk: Int - entriesCount: Int - owner: PublicUserNode -} - -type PublicUserNode implements Node { - firstName: String! - lastName: String! - avatarUrl: String! - id: ID! - fullName: String! - isMe: Boolean -} - -type Query { - newsTeasers: [NewsTeaserNode] - survey(id: ID): SurveyNode - surveys(offset: Int, before: String, after: String, first: Int, last: Int): SurveyNodeConnection - project(id: ID, slug: String): ProjectNode - projects: [ProjectNode] - instrument(slug: String, id: ID): InstrumentNode - instruments: [InstrumentNode] - instrumentTypes: [InstrumentTypeNode] - instrumentCategories: [InstrumentCategoryNode] - studentSubmission(id: ID!): StudentSubmissionNode - assignment(id: ID!): AssignmentNode - assignments: [AssignmentNode] - node(id: ID!): Node - topic(slug: String): TopicOr404Node - module(slug: String, id: ID): ModuleNode - chapter(id: ID!): ChapterNode - contentBlock(id: ID!): ContentBlockNode - snapshot(id: ID!): SnapshotNode - topics(before: String, after: String, first: Int, last: Int): TopicConnection - modules(before: String, after: String, first: Int, last: Int): ModuleConnection - chapters(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, title: String): ChapterNodeConnection - moduleLevel(id: ID!): ModuleLevelNode - moduleLevels: [ModuleLevelNode] - moduleCategory(id: ID!): ModuleCategoryNode - moduleCategories: [ModuleCategoryNode] - objectiveGroup(id: ID!): ObjectiveGroupNode - objectiveGroups(offset: Int, before: String, after: String, first: Int, last: Int, title: String, module_Slug: String): ObjectiveGroupNodeConnection - roomEntry(id: ID, slug: String): RoomEntryNode - room(slug: String, id: ID, appearance: String): RoomNode - rooms: [RoomNode] - allRoomEntries(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): RoomEntryNodeConnection - moduleRoom(slug: String, classId: ID): RoomNode - me: PrivateUserNode - allUsers(offset: Int, before: String, after: String, first: Int, last: Int, username: String, email: String): PrivateUserNodeConnection - myActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection - myInstrumentActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): InstrumentNodeConnection - _debug: DjangoDebug -} - -union RedeemCouponResult = Success | InvalidCoupon - -type RoomEntryNode implements Node { - id: ID! - title: String! - description: String - slug: String! - room: RoomNode! - author: PublicUserNode - contents: GenericStreamFieldType - comments: [CommentNode] - pk: Int -} - -type RoomEntryNodeConnection { - pageInfo: PageInfo! - edges: [RoomEntryNodeEdge]! -} - -type RoomEntryNodeEdge { - node: RoomEntryNode - cursor: String! -} - -type RoomNode implements Node { - id: ID! - title: String! - description: String - slug: String! - schoolClass: SchoolClassNode! - appearance: String! - userCreated: Boolean! - restricted: Boolean! - roomEntries(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): RoomEntryNodeConnection! - pk: Int - entryCount: Int -} - -input SchoolClassInput { - id: ID - name: String -} - -type SchoolClassNode implements Node { - name: String! - code: String - id: ID! - pk: Int - members: [ClassMemberNode] - readOnly: Boolean -} - -input ShareSnapshotInput { - snapshot: ID! - shared: Boolean! - clientMutationId: String -} - -type ShareSnapshotPayload { - success: Boolean! - snapshot: SnapshotNode - clientMutationId: String -} - -type SnapshotChangesNode { - hiddenObjectives: Int! - newObjectives: Int! - hiddenContentBlocks: Int! - newContentBlocks: Int! -} - -type SnapshotChapterNode implements Node & ChapterInterface { - id: ID! - description: String - title: String - contentBlocks: [SnapshotContentBlockNode] - descriptionHidden: Boolean - titleHidden: Boolean -} - -type SnapshotContentBlockNode implements Node & ContentBlockInterface { - id: ID! - title: String - contents: GenericStreamFieldType - type: String - hidden: Boolean -} - -type SnapshotNode implements Node { - 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 -} - -type SnapshotNodeConnection { - pageInfo: PageInfo! - edges: [SnapshotNodeEdge]! -} - -type SnapshotNodeEdge { - node: SnapshotNode - cursor: String! -} - -type SnapshotObjectiveGroupNode implements Node { - id: ID! - title: String! - hidden: Boolean! - displayTitle: String! - objectives: [SnapshotObjectiveNode]! -} - -type SnapshotObjectiveNode implements Node { - id: ID! - hidden: Boolean! - text: String! -} - -input SpellCheckInput { - text: String! - assignment: ID! - clientMutationId: String -} - type SpellCheckPayload { results: [SpellCheckStepNode] correct: Boolean @@ -1126,182 +1095,48 @@ type SpellCheckStepNode { corrected: String } -type StudentSubmissionNode implements Node { - id: ID! - created: DateTime! - modified: DateTime! +input SpellCheckInput { text: String! - document: String! - assignment: AssignmentNode! - student: PrivateUserNode! - final: Boolean! - submissionFeedback: SubmissionFeedbackNode + assignment: ID! + clientMutationId: String } -type StudentSubmissionNodeConnection { - pageInfo: PageInfo! - edges: [StudentSubmissionNodeEdge]! +type AddNotePayload { + note: NoteNode + clientMutationId: String } -type StudentSubmissionNodeEdge { - node: StudentSubmissionNode - cursor: String! +input AddNoteInput { + note: AddNoteArgument + clientMutationId: String } -input SubmissionFeedbackInput { - id: ID - studentSubmission: ID! +input AddNoteArgument { + content: UUID + block: String + type: String + parent: ID text: String! - final: Boolean } -type SubmissionFeedbackNode implements Node { - created: DateTime! - modified: DateTime! +type UpdateNotePayload { + note: NoteNode + clientMutationId: String +} + +input UpdateNoteInput { + note: UpdateNoteArgument + clientMutationId: String +} + +input UpdateNoteArgument { + id: ID! text: String! - teacher: PrivateUserNode! - studentSubmission: StudentSubmissionNode! - final: Boolean! - id: ID! } -type Success implements SuccessNode { - message: String -} - -interface SuccessNode { - message: String -} - -type SurveyNode implements Node { - id: ID! - title: String! - module: ModuleNode - data: JSONString! - answers(offset: Int, before: String, after: String, first: Int, last: Int): AnswerNodeConnection! - pk: Int - answer: AnswerNode -} - -type SurveyNodeConnection { - pageInfo: PageInfo! - edges: [SurveyNodeEdge]! -} - -type SurveyNodeEdge { - node: SurveyNode - cursor: String! -} - -input SyncModuleVisibilityInput { - module: String! - templateSchoolClass: ID! - schoolClass: ID! - clientMutationId: String -} - -type SyncModuleVisibilityPayload { +type UpdateContentBookmarkPayload { success: Boolean - clientMutationId: String -} - -type TeamNode implements Node { - id: ID! - name: String! - isDeleted: Boolean! - code: String - creator: PrivateUserNode - members: [PublicUserNode] - pk: Int -} - -type TopicConnection { - pageInfo: PageInfo! - edges: [TopicEdge]! - nodes: [TopicNode] -} - -type TopicEdge { - node: TopicNode - cursor: String! -} - -type TopicNode implements Node { - title: String! - slug: String! - order: Int! - teaser: String! - description: String! - vimeoId: String - instructions: String - id: ID! - pk: Int - modules(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection -} - -union TopicOr404Node = TopicNode | NotFound - -scalar UUID - -input UpdateAnswerArgument { - surveyId: ID! - data: String! -} - -input UpdateAnswerInput { - answer: UpdateAnswerArgument - clientMutationId: String -} - -type UpdateAnswerPayload { - answer: AnswerNode - clientMutationId: String -} - -input UpdateAssignmentInput { - assignment: AssignmentInput - clientMutationId: String -} - -type UpdateAssignmentPayload { - updatedAssignment: AssignmentNode - submission: StudentSubmissionNode - successful: Boolean - errors: [String] - clientMutationId: String -} - -input UpdateAvatarInput { - avatarUrl: String - clientMutationId: String -} - -type UpdateAvatarPayload { - success: Boolean - errors: [UpdateError] - clientMutationId: String -} - -input UpdateChapterBookmarkInput { - chapter: ID! - bookmarked: Boolean! - clientMutationId: String -} - -type UpdateChapterBookmarkPayload { - success: Boolean - clientMutationId: String -} - -input UpdateChapterVisibilityInput { - id: ID! - visibility: [UserGroupBlockVisibility] - type: String! - clientMutationId: String -} - -type UpdateChapterVisibilityPayload { - chapter: ChapterNode + errors: String clientMutationId: String } @@ -1312,61 +1147,13 @@ input UpdateContentBookmarkInput { clientMutationId: String } -type UpdateContentBookmarkPayload { - success: Boolean - errors: String - clientMutationId: String -} - -type UpdateError { - field: String - errors: [FieldError] -} - -input UpdateInstrumentBookmarkInput { - uuid: UUID! - instrument: String! - bookmarked: Boolean! - clientMutationId: String -} - -type UpdateInstrumentBookmarkPayload { +type UpdateChapterBookmarkPayload { success: Boolean clientMutationId: String } -input UpdateLastModuleInput { - id: ID - clientMutationId: String -} - -input UpdateLastModuleLevelInput { - id: ID - clientMutationId: String -} - -type UpdateLastModuleLevelPayload { - user: PrivateUserNode - clientMutationId: String -} - -type UpdateLastModulePayload { - lastModule: ModuleNode - clientMutationId: String -} - -input UpdateLastTopicInput { - id: ID - clientMutationId: String -} - -type UpdateLastTopicPayload { - topic: TopicNode - clientMutationId: String -} - -input UpdateModuleBookmarkInput { - module: String! +input UpdateChapterBookmarkInput { + chapter: ID! bookmarked: Boolean! clientMutationId: String } @@ -1376,45 +1163,52 @@ type UpdateModuleBookmarkPayload { clientMutationId: String } -input UpdateNoteArgument { - id: ID! - text: String! -} - -input UpdateNoteInput { - note: UpdateNoteArgument +input UpdateModuleBookmarkInput { + module: String! + bookmarked: Boolean! clientMutationId: String } -type UpdateNotePayload { - note: NoteNode - clientMutationId: String -} - -input UpdateObjectiveGroupVisibilityInput { - id: ID! - visibility: [UserGroupBlockVisibility] - clientMutationId: String -} - -type UpdateObjectiveGroupVisibilityPayload { - objectiveGroup: ObjectiveGroupNode - clientMutationId: String -} - -input UpdateObjectiveVisibilityInput { - id: ID! - visibility: [UserGroupBlockVisibility] - clientMutationId: String -} - -type UpdateObjectiveVisibilityPayload { - objective: ObjectiveNode - clientMutationId: String -} - -type UpdateOnboardingProgress { +type UpdateInstrumentBookmarkPayload { success: Boolean + clientMutationId: String +} + +input UpdateInstrumentBookmarkInput { + uuid: UUID! + instrument: String! + bookmarked: Boolean! + clientMutationId: String +} + +type UpdateAnswerPayload { + answer: AnswerNode + clientMutationId: String +} + +input UpdateAnswerInput { + answer: UpdateAnswerArgument + clientMutationId: String +} + +input UpdateAnswerArgument { + surveyId: ID! + data: String! +} + +type UpdatePasswordPayload { + success: Boolean + errors: [UpdateError] + clientMutationId: String +} + +type UpdateError { + field: String + errors: [FieldError] +} + +type FieldError { + code: String } input UpdatePasswordInput { @@ -1422,12 +1216,160 @@ input UpdatePasswordInput { clientMutationId: String } -type UpdatePasswordPayload { +input PasswordUpdateInput { + oldPassword: String + newPassword: String +} + +type UpdateAvatarPayload { success: Boolean errors: [UpdateError] clientMutationId: String } +input UpdateAvatarInput { + avatarUrl: String + clientMutationId: String +} + +type UpdateSettingPayload { + success: Boolean + errors: [UpdateError] + clientMutationId: String +} + +input UpdateSettingInput { + id: ID! + clientMutationId: String +} + +type JoinClassPayload { + success: Boolean + schoolClass: SchoolClassNode + clientMutationId: String +} + +input JoinClassInput { + code: String! + clientMutationId: String +} + +type AddRemoveMemberPayload { + success: Boolean + clientMutationId: String +} + +input AddRemoveMemberInput { + member: ID! + schoolClass: ID! + active: Boolean! + clientMutationId: String +} + +type UpdateSchoolClassPayload { + success: Boolean + schoolClass: SchoolClassNode + clientMutationId: String +} + +input UpdateSchoolClassInput { + id: ID! + name: String + clientMutationId: String +} + +type CreateSchoolClassPayload { + result: CreateSchoolClassResult + clientMutationId: String +} + +union CreateSchoolClassResult = SchoolClassNode | DuplicateName + +type DuplicateName implements FailureNode { + reason: String +} + +interface FailureNode { + reason: String +} + +input CreateSchoolClassInput { + name: String + clientMutationId: String +} + +type UpdateOnboardingProgress { + success: Boolean +} + +type CreateTeamPayload { + result: CreateTeamResult + clientMutationId: String +} + +union CreateTeamResult = TeamNode | DuplicateName + +input CreateTeamInput { + name: String! + clientMutationId: String +} + +type JoinTeamPayload { + success: Boolean + team: TeamNode + clientMutationId: String +} + +input JoinTeamInput { + code: String! + clientMutationId: String +} + +type UpdateTeamPayload { + success: Boolean + team: TeamNode + clientMutationId: String +} + +input UpdateTeamInput { + id: ID! + name: String + clientMutationId: String +} + +type LeaveTeam { + success: Boolean +} + +type AddProjectPayload { + errors: [String] + project: ProjectNode + clientMutationId: String +} + +input AddProjectInput { + project: AddProjectArgument + clientMutationId: String +} + +input AddProjectArgument { + title: String + description: String + objectives: String + appearance: String +} + +type UpdateProjectPayload { + errors: [String] + project: ProjectNode + clientMutationId: String +} + +input UpdateProjectInput { + project: UpdateProjectArgument + clientMutationId: String +} + input UpdateProjectArgument { title: String description: String @@ -1437,31 +1379,66 @@ input UpdateProjectArgument { final: Boolean } -input UpdateProjectEntryArgument { - description: String - documentUrl: String - id: ID! +type DeleteProjectPayload { + success: Boolean + errors: [String] + clientMutationId: String } -input UpdateProjectEntryInput { - projectEntry: UpdateProjectEntryArgument +input DeleteProjectInput { + slug: String! clientMutationId: String } +type AddProjectEntryPayload { + errors: [String] + projectEntry: ProjectEntryNode + clientMutationId: String +} + +input AddProjectEntryInput { + projectEntry: AddProjectEntryArgument + clientMutationId: String +} + +input AddProjectEntryArgument { + description: String + documentUrl: String + project: String! +} + type UpdateProjectEntryPayload { errors: [String] projectEntry: ProjectEntryNode clientMutationId: String } -input UpdateProjectInput { - project: UpdateProjectArgument +input UpdateProjectEntryInput { + projectEntry: UpdateProjectEntryArgument clientMutationId: String } -type UpdateProjectPayload { +input UpdateProjectEntryArgument { + description: String + documentUrl: String + id: ID! +} + +type DeleteProjectEntryPayload { + success: Boolean + errors: [String] + clientMutationId: String +} + +input DeleteProjectEntryInput { + id: ID! + clientMutationId: String +} + +type UpdateProjectSharedStatePayload { + success: Boolean + shared: Boolean errors: [String] - project: ProjectNode clientMutationId: String } @@ -1471,13 +1448,138 @@ input UpdateProjectSharedStateInput { clientMutationId: String } -type UpdateProjectSharedStatePayload { +type Logout { success: Boolean - shared: Boolean +} + +type CouponPayload { + result: RedeemCouponResult + clientMutationId: String +} + +union RedeemCouponResult = Success | InvalidCoupon + +type Success implements SuccessNode { + message: String +} + +interface SuccessNode { + message: String +} + +type InvalidCoupon implements FailureNode { + reason: String +} + +input CouponInput { + couponCode: String + clientMutationId: String +} + +type UpdateObjectiveVisibilityPayload { + objective: ObjectiveNode + clientMutationId: String +} + +input UpdateObjectiveVisibilityInput { + """The ID of the objective""" + id: ID! + visibility: [UserGroupBlockVisibility] + clientMutationId: String +} + +input UserGroupBlockVisibility { + schoolClassId: ID! + hidden: Boolean! +} + +type UpdateObjectiveGroupVisibilityPayload { + objectiveGroup: ObjectiveGroupNode + clientMutationId: String +} + +input UpdateObjectiveGroupVisibilityInput { + """The ID of the objective group""" + id: ID! + visibility: [UserGroupBlockVisibility] + clientMutationId: String +} + +type AddObjectivePayload { + objective: ObjectiveNode + clientMutationId: String +} + +input AddObjectiveInput { + objective: AddObjectiveArgument + clientMutationId: String +} + +input AddObjectiveArgument { + text: String! + objectiveGroup: ID +} + +type DeleteObjectivePayload { + success: Boolean + clientMutationId: String +} + +input DeleteObjectiveInput { + id: ID! + clientMutationId: String +} + +type UpdateAssignmentPayload { + updatedAssignment: AssignmentNode + submission: StudentSubmissionNode + successful: Boolean errors: [String] clientMutationId: String } +input UpdateAssignmentInput { + assignment: AssignmentInput + clientMutationId: String +} + +input AssignmentInput { + id: ID! + answer: String! + document: String + final: Boolean +} + +type UpdateSubmissionFeedbackPayload { + updatedSubmissionFeedback: SubmissionFeedbackNode + successful: Boolean + errors: [String] + clientMutationId: String +} + +input UpdateSubmissionFeedbackInput { + submissionFeedback: SubmissionFeedbackInput + clientMutationId: String +} + +input SubmissionFeedbackInput { + id: ID + studentSubmission: ID! + text: String! + final: Boolean +} + +type UpdateRoomPayload { + errors: [String] + room: RoomNode + clientMutationId: String +} + +input UpdateRoomInput { + room: UpdateRoomArgument + clientMutationId: String +} + input UpdateRoomArgument { title: String description: String @@ -1486,14 +1588,125 @@ input UpdateRoomArgument { id: ID! } -input UpdateRoomEntryArgument { - title: String! - contents: [ContentElementInput] - slug: String! +input SchoolClassInput { + id: ID + name: String } -input UpdateRoomEntryInput { - roomEntry: UpdateRoomEntryArgument +type AddRoomPayload { + errors: [String] + room: RoomNode + clientMutationId: String +} + +input AddRoomInput { + room: AddRoomArgument + clientMutationId: String +} + +input AddRoomArgument { + title: String + description: String + schoolClass: SchoolClassInput + appearance: String +} + +type DeleteRoomPayload { + success: Boolean + errors: [String] + clientMutationId: String +} + +input DeleteRoomInput { + id: ID! + clientMutationId: String +} + +type AddRoomEntryPayload { + roomEntry: RoomEntryNode + errors: [String] + clientMutationId: String +} + +input AddRoomEntryInput { + roomEntry: AddRoomEntryArgument + clientMutationId: String +} + +input AddRoomEntryArgument { + title: String! + contents: [ContentElementInput] + roomSlug: String! +} + +input ContentElementInput { + id: String + type: InputTypes! + value: ContentElementValueInput + contents: [ContentElementInput] +} + +enum InputTypes { + text_block + assignment + image_block + image_url_block + link_block + video_block + document_block + content_list_item + subtitle + readonly +} + +input ContentElementValueInput { + """To be used for link_block, text_block types""" + text: String + + """To be used for link, image_block types""" + url: String + + """To be used for basic_knowledge type""" + description: String + + """To be used for image_block, assignment type""" + title: String + + """To be used for assignment type""" + assignment: String + + """To be used for assignment type""" + id: String +} + +type AddModuleRoomEntryPayload { + roomEntry: RoomEntryNode + errors: [String] + clientMutationId: String +} + +input AddModuleRoomEntryInput { + roomEntry: AddModuleRoomEntryArgument + clientMutationId: String +} + +input AddModuleRoomEntryArgument { + title: String! + contents: [ContentElementInput] + roomSlug: String! + schoolClass: String! +} + +type DeleteRoomEntryPayload { + success: Boolean + roomSlug: String + roomId: ID + errors: [String] + clientMutationId: String +} + +input DeleteRoomEntryInput { + slug: String! clientMutationId: String } @@ -1503,13 +1716,31 @@ type UpdateRoomEntryPayload { clientMutationId: String } -input UpdateRoomInput { - room: UpdateRoomArgument +input UpdateRoomEntryInput { + roomEntry: UpdateRoomEntryArgument clientMutationId: String } -type UpdateRoomPayload { - errors: [String] +input UpdateRoomEntryArgument { + title: String! + contents: [ContentElementInput] + slug: String! +} + +type AddCommentPayload { + success: Boolean + comment: CommentNode + clientMutationId: String +} + +input AddCommentInput { + comment: String! + roomEntry: ID! + clientMutationId: String +} + +type UpdateRoomVisibilityPayload { + success: Boolean room: RoomNode clientMutationId: String } @@ -1520,51 +1751,55 @@ input UpdateRoomVisibilityInput { clientMutationId: String } -type UpdateRoomVisibilityPayload { - success: Boolean - room: RoomNode +type MutateContentBlockPayload { + contentBlock: ContentBlockNode clientMutationId: String } -input UpdateSchoolClassInput { +input MutateContentBlockInput { id: ID! - name: String + contentBlock: ContentBlockInput clientMutationId: String } -type UpdateSchoolClassPayload { - success: Boolean - schoolClass: SchoolClassNode - clientMutationId: String -} - -input UpdateSettingInput { - id: ID! - clientMutationId: String -} - -type UpdateSettingPayload { - success: Boolean - errors: [UpdateError] - clientMutationId: String -} - -input UpdateSnapshotInput { - id: ID! +input ContentBlockInput { title: String + type: String + contents: [ContentElementInput] + visibility: [UserGroupBlockVisibility] +} + +type AddContentBlockPayload { + newContentBlock: ContentBlockNode + errors: [String] clientMutationId: String } -type UpdateSnapshotPayload { - snapshot: UpdateSnapshotResult +input AddContentBlockInput { + contentBlock: ContentBlockInput + parent: ID + after: ID clientMutationId: String } -union UpdateSnapshotResult = SnapshotNode | NotOwner +type DeleteContentBlockPayload { + success: Boolean + errors: String + clientMutationId: String +} -input UpdateSolutionVisibilityInput { - slug: String - enabled: Boolean +input DeleteContentBlockInput { + id: ID! + clientMutationId: String +} + +type DuplicateContentBlockPayload { + contentBlock: ContentBlockNode + clientMutationId: String +} + +input DuplicateContentBlockInput { + id: ID! clientMutationId: String } @@ -1575,31 +1810,127 @@ type UpdateSolutionVisibilityPayload { clientMutationId: String } -input UpdateSubmissionFeedbackInput { - submissionFeedback: SubmissionFeedbackInput +input UpdateSolutionVisibilityInput { + slug: String + enabled: Boolean clientMutationId: String } -type UpdateSubmissionFeedbackPayload { - updatedSubmissionFeedback: SubmissionFeedbackNode - successful: Boolean - errors: [String] +type UpdateLastModulePayload { + lastModule: ModuleNode clientMutationId: String } -input UpdateTeamInput { +input UpdateLastModuleInput { + id: ID + clientMutationId: String +} + +type UpdateLastTopicPayload { + topic: TopicNode + clientMutationId: String +} + +input UpdateLastTopicInput { + id: ID + clientMutationId: String +} + +type UpdateLastModuleLevelPayload { + user: PrivateUserNode + clientMutationId: String +} + +input UpdateLastModuleLevelInput { + id: ID + clientMutationId: String +} + +type UpdateChapterVisibilityPayload { + chapter: ChapterNode + clientMutationId: String +} + +input UpdateChapterVisibilityInput { id: ID! - name: String + visibility: [UserGroupBlockVisibility] + type: String! clientMutationId: String } -type UpdateTeamPayload { +type SyncModuleVisibilityPayload { success: Boolean - team: TeamNode clientMutationId: String } -input UserGroupBlockVisibility { - schoolClassId: ID! - hidden: Boolean! +input SyncModuleVisibilityInput { + module: String! + templateSchoolClass: ID! + schoolClass: ID! + clientMutationId: String } + +type CreateSnapshotPayload { + snapshot: SnapshotNode + success: Boolean + clientMutationId: String +} + +input CreateSnapshotInput { + module: String! + selectedClass: ID! + clientMutationId: String +} + +type ApplySnapshotPayload { + success: Boolean + module: ModuleNode + clientMutationId: String +} + +input ApplySnapshotInput { + snapshot: ID! + selectedClass: ID! + clientMutationId: String +} + +type ShareSnapshotPayload { + success: Boolean! + snapshot: SnapshotNode + clientMutationId: String +} + +input ShareSnapshotInput { + snapshot: ID! + shared: Boolean! + clientMutationId: String +} + +type UpdateSnapshotPayload { + snapshot: UpdateSnapshotResult + clientMutationId: String +} + +union UpdateSnapshotResult = SnapshotNode | NotOwner + +type NotOwner implements FailureNode { + reason: String +} + +input UpdateSnapshotInput { + id: ID! + title: String + clientMutationId: String +} + +type DeleteSnapshotPayload { + result: DeleteSnapshotResult + clientMutationId: String +} + +union DeleteSnapshotResult = Success | NotOwner + +input DeleteSnapshotInput { + id: ID! + clientMutationId: String +} \ No newline at end of file