From 794bc661b6edc00091d280cd96d693df3215052b Mon Sep 17 00:00:00 2001 From: d471061c Date: Wed, 19 Feb 2020 11:29:18 +0200 Subject: [PATCH 01/19] add types for objective links --- .../schema/generated/prisma-client/index.d.ts | 972 +++++++++++++++--- .../schema/generated/prisma-client/index.js | 4 + .../generated/prisma-client/prisma-schema.js | 472 ++++++++- .../generated/prisma-client/prisma.graphql | 470 +++++++++ backend/schema/generated/schema.graphql | 14 + backend/schema/source/datamodel.prisma | 14 + 6 files changed, 1825 insertions(+), 121 deletions(-) diff --git a/backend/schema/generated/prisma-client/index.d.ts b/backend/schema/generated/prisma-client/index.d.ts index 56cbe5c3a..088fc1ac3 100644 --- a/backend/schema/generated/prisma-client/index.d.ts +++ b/backend/schema/generated/prisma-client/index.d.ts @@ -1,4 +1,4 @@ -// Code generated by Prisma (prisma@1.34.10). DO NOT EDIT. +// Code generated by Prisma (prisma@1.34.8). DO NOT EDIT. // Please don't change this file manually but run `prisma generate` to update it. // For more information, please read the docs: https://www.prisma.io/docs/prisma-client/ @@ -23,6 +23,7 @@ export interface Exists { course: (where?: CourseWhereInput) => Promise; courseLink: (where?: CourseLinkWhereInput) => Promise; goalLink: (where?: GoalLinkWhereInput) => Promise; + objectiveLink: (where?: ObjectiveLinkWhereInput) => Promise; pointGroup: (where?: PointGroupWhereInput) => Promise; project: (where?: ProjectWhereInput) => Promise; projectParticipant: ( @@ -194,6 +195,27 @@ export interface Prisma { first?: Int; last?: Int; }) => GoalLinkConnectionPromise; + objectiveLink: ( + where: ObjectiveLinkWhereUniqueInput + ) => ObjectiveLinkNullablePromise; + objectiveLinks: (args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => FragmentableArray; + objectiveLinksConnection: (args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => ObjectiveLinkConnectionPromise; pointGroup: (where: PointGroupWhereUniqueInput) => PointGroupNullablePromise; pointGroups: (args?: { where?: PointGroupWhereInput; @@ -495,6 +517,26 @@ export interface Prisma { }) => GoalLinkPromise; deleteGoalLink: (where: GoalLinkWhereUniqueInput) => GoalLinkPromise; deleteManyGoalLinks: (where?: GoalLinkWhereInput) => BatchPayloadPromise; + createObjectiveLink: (data: ObjectiveLinkCreateInput) => ObjectiveLinkPromise; + updateObjectiveLink: (args: { + data: ObjectiveLinkUpdateInput; + where: ObjectiveLinkWhereUniqueInput; + }) => ObjectiveLinkPromise; + updateManyObjectiveLinks: (args: { + data: ObjectiveLinkUpdateManyMutationInput; + where?: ObjectiveLinkWhereInput; + }) => BatchPayloadPromise; + upsertObjectiveLink: (args: { + where: ObjectiveLinkWhereUniqueInput; + create: ObjectiveLinkCreateInput; + update: ObjectiveLinkUpdateInput; + }) => ObjectiveLinkPromise; + deleteObjectiveLink: ( + where: ObjectiveLinkWhereUniqueInput + ) => ObjectiveLinkPromise; + deleteManyObjectiveLinks: ( + where?: ObjectiveLinkWhereInput + ) => BatchPayloadPromise; createPointGroup: (data: PointGroupCreateInput) => PointGroupPromise; updatePointGroup: (args: { data: PointGroupUpdateInput; @@ -691,6 +733,9 @@ export interface Subscription { goalLink: ( where?: GoalLinkSubscriptionWhereInput ) => GoalLinkSubscriptionPayloadSubscription; + objectiveLink: ( + where?: ObjectiveLinkSubscriptionWhereInput + ) => ObjectiveLinkSubscriptionPayloadSubscription; pointGroup: ( where?: PointGroupSubscriptionWhereInput ) => PointGroupSubscriptionPayloadSubscription; @@ -882,6 +927,16 @@ export type GoalLinkOrderByInput = | "updatedAt_ASC" | "updatedAt_DESC"; +export type ObjectiveLinkOrderByInput = + | "id_ASC" + | "id_DESC" + | "text_ASC" + | "text_DESC" + | "createdAt_ASC" + | "createdAt_DESC" + | "updatedAt_ASC" + | "updatedAt_DESC"; + export type WorkspaceTokenOrderByInput = | "id_ASC" | "id_DESC" @@ -1223,6 +1278,9 @@ export interface WorkspaceWhereInput { goalLinks_every?: Maybe; goalLinks_some?: Maybe; goalLinks_none?: Maybe; + objectiveLinks_every?: Maybe; + objectiveLinks_some?: Maybe; + objectiveLinks_none?: Maybe; participants_every?: Maybe; participants_some?: Maybe; participants_none?: Maybe; @@ -1474,6 +1532,9 @@ export interface CourseWhereInput { goalLinks_every?: Maybe; goalLinks_some?: Maybe; goalLinks_none?: Maybe; + objectiveLinks_every?: Maybe; + objectiveLinks_some?: Maybe; + objectiveLinks_none?: Maybe; AND?: Maybe; OR?: Maybe; NOT?: Maybe; @@ -1867,6 +1928,60 @@ export interface GoalLinkWhereInput { NOT?: Maybe; } +export interface ObjectiveLinkWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + course?: Maybe; + goal?: Maybe; + workspace?: Maybe; + text?: Maybe; + text_not?: Maybe; + text_in?: Maybe; + text_not_in?: Maybe; + text_lt?: Maybe; + text_lte?: Maybe; + text_gt?: Maybe; + text_gte?: Maybe; + text_contains?: Maybe; + text_not_contains?: Maybe; + text_starts_with?: Maybe; + text_not_starts_with?: Maybe; + text_ends_with?: Maybe; + text_not_ends_with?: Maybe; + createdBy?: Maybe; + createdAt?: Maybe; + createdAt_not?: Maybe; + createdAt_in?: Maybe; + createdAt_not_in?: Maybe; + createdAt_lt?: Maybe; + createdAt_lte?: Maybe; + createdAt_gt?: Maybe; + createdAt_gte?: Maybe; + updatedAt?: Maybe; + updatedAt_not?: Maybe; + updatedAt_in?: Maybe; + updatedAt_not_in?: Maybe; + updatedAt_lt?: Maybe; + updatedAt_lte?: Maybe; + updatedAt_gt?: Maybe; + updatedAt_gte?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + export interface WorkspaceTokenWhereInput { id?: Maybe; id_not?: Maybe; @@ -2055,6 +2170,10 @@ export type GoalLinkWhereUniqueInput = AtLeastOne<{ id: Maybe; }>; +export type ObjectiveLinkWhereUniqueInput = AtLeastOne<{ + id: Maybe; +}>; + export type PointGroupWhereUniqueInput = AtLeastOne<{ id: Maybe; }>; @@ -2160,6 +2279,7 @@ export interface WorkspaceCreateWithoutParticipantsInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; tokens?: Maybe; mainCourse?: Maybe; pointGroups?: Maybe; @@ -2206,6 +2326,7 @@ export interface WorkspaceCreateInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2236,6 +2357,7 @@ export interface WorkspaceCreateWithoutClonesInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2285,6 +2407,7 @@ export interface WorkspaceCreateWithoutSourceProjectInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2333,6 +2456,7 @@ export interface WorkspaceCreateWithoutAsMergeInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2366,6 +2490,7 @@ export interface WorkspaceCreateWithoutSourceTemplateInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2398,6 +2523,7 @@ export interface CourseCreateWithoutWorkspaceInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface TagCreateManyInput { @@ -2432,6 +2558,7 @@ export interface CourseCreateWithoutClonesInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseLinkCreateManyWithoutFromInput { @@ -2473,6 +2600,7 @@ export interface CourseCreateWithoutLinksToCourseInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseCreateManyWithoutSourceCourseInput { @@ -2498,6 +2626,7 @@ export interface CourseCreateWithoutSourceCourseInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseLinkCreateManyWithoutToInput { @@ -2539,6 +2668,7 @@ export interface CourseCreateWithoutLinksFromCourseInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface WorkspaceCreateOneWithoutCoursesInput { @@ -2561,6 +2691,7 @@ export interface WorkspaceCreateWithoutCoursesInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2772,6 +2903,7 @@ export interface CourseCreateWithoutConceptsInput { objectiveOrder?: Maybe; createdBy: UserCreateOneInput; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseCreateconceptOrderInput { @@ -2872,6 +3004,7 @@ export interface WorkspaceCreateWithoutAsTemplateInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -2972,6 +3105,7 @@ export interface WorkspaceCreateWithoutConceptsInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3057,6 +3191,7 @@ export interface CourseCreateWithoutGoalLinksInput { conceptOrder?: Maybe; objectiveOrder?: Maybe; createdBy: UserCreateOneInput; + objectiveLinks?: Maybe; } export interface ConceptCreateManyWithoutCourseInput { @@ -3086,11 +3221,60 @@ export interface ConceptCreateWithoutCourseInput { createdBy: UserCreateOneInput; } +export interface ObjectiveLinkCreateManyWithoutCourseInput { + create?: Maybe< + | ObjectiveLinkCreateWithoutCourseInput[] + | ObjectiveLinkCreateWithoutCourseInput + >; + connect?: Maybe< + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput + >; +} + +export interface ObjectiveLinkCreateWithoutCourseInput { + id?: Maybe; + goal: ConceptCreateOneInput; + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; + text?: Maybe; + createdBy: UserCreateOneInput; +} + export interface ConceptCreateOneInput { create?: Maybe; connect?: Maybe; } +export interface WorkspaceCreateOneWithoutObjectiveLinksInput { + create?: Maybe; + connect?: Maybe; +} + +export interface WorkspaceCreateWithoutObjectiveLinksInput { + id?: Maybe; + name: String; + sourceProject?: Maybe; + sourceTemplate?: Maybe; + asMerge?: Maybe; + asTemplate?: Maybe; + clones?: Maybe; + courses?: Maybe; + courseOrder?: Maybe; + concepts?: Maybe; + commonConcepts?: Maybe; + conceptLinks?: Maybe; + courseLinks?: Maybe; + goals?: Maybe; + goalLinks?: Maybe; + participants?: Maybe; + tokens?: Maybe; + mainCourse?: Maybe; + pointGroups?: Maybe; + courseTags?: Maybe; + conceptTags?: Maybe; + goalTags?: Maybe; + createdBy?: Maybe; +} + export interface WorkspaceParticipantCreateManyWithoutWorkspaceInput { create?: Maybe< | WorkspaceParticipantCreateWithoutWorkspaceInput[] @@ -3142,6 +3326,7 @@ export interface WorkspaceCreateWithoutTokensInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; mainCourse?: Maybe; pointGroups?: Maybe; @@ -3151,12 +3336,30 @@ export interface WorkspaceCreateWithoutTokensInput { createdBy?: Maybe; } -export interface CourseCreateOneInput { - create?: Maybe; +export interface ObjectiveLinkCreateManyWithoutWorkspaceInput { + create?: Maybe< + | ObjectiveLinkCreateWithoutWorkspaceInput[] + | ObjectiveLinkCreateWithoutWorkspaceInput + >; + connect?: Maybe< + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput + >; +} + +export interface ObjectiveLinkCreateWithoutWorkspaceInput { + id?: Maybe; + course: CourseCreateOneWithoutObjectiveLinksInput; + goal: ConceptCreateOneInput; + text?: Maybe; + createdBy: UserCreateOneInput; +} + +export interface CourseCreateOneWithoutObjectiveLinksInput { + create?: Maybe; connect?: Maybe; } -export interface CourseCreateInput { +export interface CourseCreateWithoutObjectiveLinksInput { id?: Maybe; name: String; official?: Maybe; @@ -3209,6 +3412,7 @@ export interface WorkspaceCreateWithoutGoalLinksInput { conceptLinks?: Maybe; courseLinks?: Maybe; goals?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3275,6 +3479,30 @@ export interface UserCreateseenGuidesInput { set?: Maybe; } +export interface CourseCreateOneInput { + create?: Maybe; + connect?: Maybe; +} + +export interface CourseCreateInput { + id?: Maybe; + name: String; + official?: Maybe; + frozen?: Maybe; + tags?: Maybe; + sourceCourse?: Maybe; + clones?: Maybe; + linksFromCourse?: Maybe; + linksToCourse?: Maybe; + workspace: WorkspaceCreateOneWithoutCoursesInput; + concepts?: Maybe; + conceptOrder?: Maybe; + objectiveOrder?: Maybe; + createdBy: UserCreateOneInput; + goalLinks?: Maybe; + objectiveLinks?: Maybe; +} + export interface PointGroupCreateManyWithoutWorkspaceInput { create?: Maybe< | PointGroupCreateWithoutWorkspaceInput[] @@ -3329,6 +3557,7 @@ export interface WorkspaceCreateWithoutConceptLinksInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3457,6 +3686,7 @@ export interface WorkspaceCreateWithoutCourseLinksInput { conceptLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3566,6 +3796,7 @@ export interface WorkspaceUpdateWithoutParticipantsDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; tokens?: Maybe; mainCourse?: Maybe; pointGroups?: Maybe; @@ -3618,6 +3849,7 @@ export interface WorkspaceUpdateDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3651,6 +3883,7 @@ export interface WorkspaceUpdateWithoutClonesDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3723,6 +3956,7 @@ export interface WorkspaceUpdateWithoutSourceProjectDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3794,6 +4028,7 @@ export interface WorkspaceUpdateWithoutAsMergeDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3847,6 +4082,7 @@ export interface WorkspaceUpdateWithoutSourceTemplateDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -3899,6 +4135,7 @@ export interface CourseUpdateWithoutWorkspaceDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface TagUpdateManyInput { @@ -4042,6 +4279,7 @@ export interface CourseUpdateWithoutClonesDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseLinkUpdateManyWithoutFromInput { @@ -4104,6 +4342,7 @@ export interface CourseUpdateWithoutLinksToCourseDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseUpdateManyWithoutSourceCourseInput { @@ -4149,6 +4388,7 @@ export interface CourseUpdateWithoutSourceCourseDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseLinkUpdateManyWithoutToInput { @@ -4211,6 +4451,7 @@ export interface CourseUpdateWithoutLinksFromCourseDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface WorkspaceUpdateOneRequiredWithoutCoursesInput { @@ -4234,6 +4475,7 @@ export interface WorkspaceUpdateWithoutCoursesDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -4539,6 +4781,7 @@ export interface CourseUpdateWithoutConceptsDataInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseUpdateconceptOrderInput { @@ -4808,6 +5051,7 @@ export interface WorkspaceUpdateWithoutAsTemplateDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -4954,6 +5198,7 @@ export interface WorkspaceUpdateWithoutConceptsDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -5282,6 +5527,7 @@ export interface CourseUpdateWithoutGoalLinksDataInput { conceptOrder?: Maybe; objectiveOrder?: Maybe; createdBy?: Maybe; + objectiveLinks?: Maybe; } export interface ConceptUpdateManyWithoutCourseInput { @@ -5446,128 +5692,134 @@ export interface ConceptUpdateManyDataInput { count?: Maybe; } -export interface CourseUpsertWithoutGoalLinksInput { - update: CourseUpdateWithoutGoalLinksDataInput; - create: CourseCreateWithoutGoalLinksInput; -} - -export interface ConceptUpdateOneRequiredInput { - create?: Maybe; - update?: Maybe; - upsert?: Maybe; - connect?: Maybe; -} - -export interface ConceptUpsertNestedInput { - update: ConceptUpdateDataInput; - create: ConceptCreateInput; -} - -export interface GoalLinkUpsertWithWhereUniqueWithoutWorkspaceInput { - where: GoalLinkWhereUniqueInput; - update: GoalLinkUpdateWithoutWorkspaceDataInput; - create: GoalLinkCreateWithoutWorkspaceInput; -} - -export interface GoalLinkScalarWhereInput { - id?: Maybe; - id_not?: Maybe; - id_in?: Maybe; - id_not_in?: Maybe; - id_lt?: Maybe; - id_lte?: Maybe; - id_gt?: Maybe; - id_gte?: Maybe; - id_contains?: Maybe; - id_not_contains?: Maybe; - id_starts_with?: Maybe; - id_not_starts_with?: Maybe; - id_ends_with?: Maybe; - id_not_ends_with?: Maybe; - text?: Maybe; - text_not?: Maybe; - text_in?: Maybe; - text_not_in?: Maybe; - text_lt?: Maybe; - text_lte?: Maybe; - text_gt?: Maybe; - text_gte?: Maybe; - text_contains?: Maybe; - text_not_contains?: Maybe; - text_starts_with?: Maybe; - text_not_starts_with?: Maybe; - text_ends_with?: Maybe; - text_not_ends_with?: Maybe; - createdAt?: Maybe; - createdAt_not?: Maybe; - createdAt_in?: Maybe; - createdAt_not_in?: Maybe; - createdAt_lt?: Maybe; - createdAt_lte?: Maybe; - createdAt_gt?: Maybe; - createdAt_gte?: Maybe; - updatedAt?: Maybe; - updatedAt_not?: Maybe; - updatedAt_in?: Maybe; - updatedAt_not_in?: Maybe; - updatedAt_lt?: Maybe; - updatedAt_lte?: Maybe; - updatedAt_gt?: Maybe; - updatedAt_gte?: Maybe; - AND?: Maybe; - OR?: Maybe; - NOT?: Maybe; -} - -export interface GoalLinkUpdateManyWithWhereNestedInput { - where: GoalLinkScalarWhereInput; - data: GoalLinkUpdateManyDataInput; -} - -export interface GoalLinkUpdateManyDataInput { - text?: Maybe; -} - -export interface WorkspaceParticipantUpdateManyWithoutWorkspaceInput { +export interface ObjectiveLinkUpdateManyWithoutCourseInput { create?: Maybe< - | WorkspaceParticipantCreateWithoutWorkspaceInput[] - | WorkspaceParticipantCreateWithoutWorkspaceInput + | ObjectiveLinkCreateWithoutCourseInput[] + | ObjectiveLinkCreateWithoutCourseInput >; delete?: Maybe< - | WorkspaceParticipantWhereUniqueInput[] - | WorkspaceParticipantWhereUniqueInput + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput >; connect?: Maybe< - | WorkspaceParticipantWhereUniqueInput[] - | WorkspaceParticipantWhereUniqueInput - >; - set?: Maybe< - | WorkspaceParticipantWhereUniqueInput[] - | WorkspaceParticipantWhereUniqueInput + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput >; + set?: Maybe; disconnect?: Maybe< - | WorkspaceParticipantWhereUniqueInput[] - | WorkspaceParticipantWhereUniqueInput + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput >; update?: Maybe< - | WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput[] - | WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput + | ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput[] + | ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput >; upsert?: Maybe< - | WorkspaceParticipantUpsertWithWhereUniqueWithoutWorkspaceInput[] - | WorkspaceParticipantUpsertWithWhereUniqueWithoutWorkspaceInput + | ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput[] + | ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput >; deleteMany?: Maybe< - | WorkspaceParticipantScalarWhereInput[] - | WorkspaceParticipantScalarWhereInput + ObjectiveLinkScalarWhereInput[] | ObjectiveLinkScalarWhereInput >; updateMany?: Maybe< - | WorkspaceParticipantUpdateManyWithWhereNestedInput[] - | WorkspaceParticipantUpdateManyWithWhereNestedInput + | ObjectiveLinkUpdateManyWithWhereNestedInput[] + | ObjectiveLinkUpdateManyWithWhereNestedInput >; } -export interface WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput { +export interface ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput; + data: ObjectiveLinkUpdateWithoutCourseDataInput; +} + +export interface ObjectiveLinkUpdateWithoutCourseDataInput { + goal?: Maybe; + workspace?: Maybe; + text?: Maybe; + createdBy?: Maybe; +} + +export interface ConceptUpdateOneRequiredInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; + connect?: Maybe; +} + +export interface ConceptUpsertNestedInput { + update: ConceptUpdateDataInput; + create: ConceptCreateInput; +} + +export interface WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; + connect?: Maybe; +} + +export interface WorkspaceUpdateWithoutObjectiveLinksDataInput { + name?: Maybe; + sourceProject?: Maybe; + sourceTemplate?: Maybe; + asMerge?: Maybe; + asTemplate?: Maybe; + clones?: Maybe; + courses?: Maybe; + courseOrder?: Maybe; + concepts?: Maybe; + commonConcepts?: Maybe; + conceptLinks?: Maybe; + courseLinks?: Maybe; + goals?: Maybe; + goalLinks?: Maybe; + participants?: Maybe; + tokens?: Maybe; + mainCourse?: Maybe; + pointGroups?: Maybe; + courseTags?: Maybe; + conceptTags?: Maybe; + goalTags?: Maybe; + createdBy?: Maybe; +} + +export interface WorkspaceParticipantUpdateManyWithoutWorkspaceInput { + create?: Maybe< + | WorkspaceParticipantCreateWithoutWorkspaceInput[] + | WorkspaceParticipantCreateWithoutWorkspaceInput + >; + delete?: Maybe< + | WorkspaceParticipantWhereUniqueInput[] + | WorkspaceParticipantWhereUniqueInput + >; + connect?: Maybe< + | WorkspaceParticipantWhereUniqueInput[] + | WorkspaceParticipantWhereUniqueInput + >; + set?: Maybe< + | WorkspaceParticipantWhereUniqueInput[] + | WorkspaceParticipantWhereUniqueInput + >; + disconnect?: Maybe< + | WorkspaceParticipantWhereUniqueInput[] + | WorkspaceParticipantWhereUniqueInput + >; + update?: Maybe< + | WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput[] + | WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput + >; + upsert?: Maybe< + | WorkspaceParticipantUpsertWithWhereUniqueWithoutWorkspaceInput[] + | WorkspaceParticipantUpsertWithWhereUniqueWithoutWorkspaceInput + >; + deleteMany?: Maybe< + | WorkspaceParticipantScalarWhereInput[] + | WorkspaceParticipantScalarWhereInput + >; + updateMany?: Maybe< + | WorkspaceParticipantUpdateManyWithWhereNestedInput[] + | WorkspaceParticipantUpdateManyWithWhereNestedInput + >; +} + +export interface WorkspaceParticipantUpdateWithWhereUniqueWithoutWorkspaceInput { where: WorkspaceParticipantWhereUniqueInput; data: WorkspaceParticipantUpdateWithoutWorkspaceDataInput; } @@ -5615,6 +5867,7 @@ export interface WorkspaceUpdateWithoutTokensDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; mainCourse?: Maybe; pointGroups?: Maybe; @@ -5624,16 +5877,58 @@ export interface WorkspaceUpdateWithoutTokensDataInput { createdBy?: Maybe; } -export interface CourseUpdateOneInput { - create?: Maybe; - update?: Maybe; - upsert?: Maybe; - delete?: Maybe; - disconnect?: Maybe; +export interface ObjectiveLinkUpdateManyWithoutWorkspaceInput { + create?: Maybe< + | ObjectiveLinkCreateWithoutWorkspaceInput[] + | ObjectiveLinkCreateWithoutWorkspaceInput + >; + delete?: Maybe< + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput + >; + connect?: Maybe< + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput + >; + set?: Maybe; + disconnect?: Maybe< + ObjectiveLinkWhereUniqueInput[] | ObjectiveLinkWhereUniqueInput + >; + update?: Maybe< + | ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput[] + | ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput + >; + upsert?: Maybe< + | ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput[] + | ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput + >; + deleteMany?: Maybe< + ObjectiveLinkScalarWhereInput[] | ObjectiveLinkScalarWhereInput + >; + updateMany?: Maybe< + | ObjectiveLinkUpdateManyWithWhereNestedInput[] + | ObjectiveLinkUpdateManyWithWhereNestedInput + >; +} + +export interface ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput; + data: ObjectiveLinkUpdateWithoutWorkspaceDataInput; +} + +export interface ObjectiveLinkUpdateWithoutWorkspaceDataInput { + course?: Maybe; + goal?: Maybe; + text?: Maybe; + createdBy?: Maybe; +} + +export interface CourseUpdateOneRequiredWithoutObjectiveLinksInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; connect?: Maybe; } -export interface CourseUpdateDataInput { +export interface CourseUpdateWithoutObjectiveLinksDataInput { name?: Maybe; official?: Maybe; frozen?: Maybe; @@ -5706,6 +6001,7 @@ export interface WorkspaceUpdateWithoutGoalLinksDataInput { conceptLinks?: Maybe; courseLinks?: Maybe; goals?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -5948,6 +6244,38 @@ export interface WorkspaceTokenUpdateManyDataInput { revoked?: Maybe; } +export interface CourseUpdateOneInput { + create?: Maybe; + update?: Maybe; + upsert?: Maybe; + delete?: Maybe; + disconnect?: Maybe; + connect?: Maybe; +} + +export interface CourseUpdateDataInput { + name?: Maybe; + official?: Maybe; + frozen?: Maybe; + tags?: Maybe; + sourceCourse?: Maybe; + clones?: Maybe; + linksFromCourse?: Maybe; + linksToCourse?: Maybe; + workspace?: Maybe; + concepts?: Maybe; + conceptOrder?: Maybe; + objectiveOrder?: Maybe; + createdBy?: Maybe; + goalLinks?: Maybe; + objectiveLinks?: Maybe; +} + +export interface CourseUpsertNestedInput { + update: CourseUpdateDataInput; + create: CourseCreateInput; +} + export interface PointGroupUpdateManyWithoutWorkspaceInput { create?: Maybe< | PointGroupCreateWithoutWorkspaceInput[] @@ -5995,11 +6323,6 @@ export interface CourseUpdateOneRequiredInput { connect?: Maybe; } -export interface CourseUpsertNestedInput { - update: CourseUpdateDataInput; - create: CourseCreateInput; -} - export interface CompletionUpdateManyWithoutPointGroupInput { create?: Maybe< | CompletionCreateWithoutPointGroupInput[] @@ -6219,6 +6542,135 @@ export interface GoalLinkUpsertWithWhereUniqueWithoutCourseInput { create: GoalLinkCreateWithoutCourseInput; } +export interface GoalLinkScalarWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + text?: Maybe; + text_not?: Maybe; + text_in?: Maybe; + text_not_in?: Maybe; + text_lt?: Maybe; + text_lte?: Maybe; + text_gt?: Maybe; + text_gte?: Maybe; + text_contains?: Maybe; + text_not_contains?: Maybe; + text_starts_with?: Maybe; + text_not_starts_with?: Maybe; + text_ends_with?: Maybe; + text_not_ends_with?: Maybe; + createdAt?: Maybe; + createdAt_not?: Maybe; + createdAt_in?: Maybe; + createdAt_not_in?: Maybe; + createdAt_lt?: Maybe; + createdAt_lte?: Maybe; + createdAt_gt?: Maybe; + createdAt_gte?: Maybe; + updatedAt?: Maybe; + updatedAt_not?: Maybe; + updatedAt_in?: Maybe; + updatedAt_not_in?: Maybe; + updatedAt_lt?: Maybe; + updatedAt_lte?: Maybe; + updatedAt_gt?: Maybe; + updatedAt_gte?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface GoalLinkUpdateManyWithWhereNestedInput { + where: GoalLinkScalarWhereInput; + data: GoalLinkUpdateManyDataInput; +} + +export interface GoalLinkUpdateManyDataInput { + text?: Maybe; +} + +export interface CourseUpsertWithoutObjectiveLinksInput { + update: CourseUpdateWithoutObjectiveLinksDataInput; + create: CourseCreateWithoutObjectiveLinksInput; +} + +export interface ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput; + update: ObjectiveLinkUpdateWithoutWorkspaceDataInput; + create: ObjectiveLinkCreateWithoutWorkspaceInput; +} + +export interface ObjectiveLinkScalarWhereInput { + id?: Maybe; + id_not?: Maybe; + id_in?: Maybe; + id_not_in?: Maybe; + id_lt?: Maybe; + id_lte?: Maybe; + id_gt?: Maybe; + id_gte?: Maybe; + id_contains?: Maybe; + id_not_contains?: Maybe; + id_starts_with?: Maybe; + id_not_starts_with?: Maybe; + id_ends_with?: Maybe; + id_not_ends_with?: Maybe; + text?: Maybe; + text_not?: Maybe; + text_in?: Maybe; + text_not_in?: Maybe; + text_lt?: Maybe; + text_lte?: Maybe; + text_gt?: Maybe; + text_gte?: Maybe; + text_contains?: Maybe; + text_not_contains?: Maybe; + text_starts_with?: Maybe; + text_not_starts_with?: Maybe; + text_ends_with?: Maybe; + text_not_ends_with?: Maybe; + createdAt?: Maybe; + createdAt_not?: Maybe; + createdAt_in?: Maybe; + createdAt_not_in?: Maybe; + createdAt_lt?: Maybe; + createdAt_lte?: Maybe; + createdAt_gt?: Maybe; + createdAt_gte?: Maybe; + updatedAt?: Maybe; + updatedAt_not?: Maybe; + updatedAt_in?: Maybe; + updatedAt_not_in?: Maybe; + updatedAt_lt?: Maybe; + updatedAt_lte?: Maybe; + updatedAt_gt?: Maybe; + updatedAt_gte?: Maybe; + AND?: Maybe; + OR?: Maybe; + NOT?: Maybe; +} + +export interface ObjectiveLinkUpdateManyWithWhereNestedInput { + where: ObjectiveLinkScalarWhereInput; + data: ObjectiveLinkUpdateManyDataInput; +} + +export interface ObjectiveLinkUpdateManyDataInput { + text?: Maybe; +} + export interface WorkspaceUpsertWithoutTokensInput { update: WorkspaceUpdateWithoutTokensDataInput; create: WorkspaceCreateWithoutTokensInput; @@ -6235,6 +6687,28 @@ export interface WorkspaceParticipantUpsertWithWhereUniqueWithoutWorkspaceInput create: WorkspaceParticipantCreateWithoutWorkspaceInput; } +export interface WorkspaceUpsertWithoutObjectiveLinksInput { + update: WorkspaceUpdateWithoutObjectiveLinksDataInput; + create: WorkspaceCreateWithoutObjectiveLinksInput; +} + +export interface ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput; + update: ObjectiveLinkUpdateWithoutCourseDataInput; + create: ObjectiveLinkCreateWithoutCourseInput; +} + +export interface CourseUpsertWithoutGoalLinksInput { + update: CourseUpdateWithoutGoalLinksDataInput; + create: CourseCreateWithoutGoalLinksInput; +} + +export interface GoalLinkUpsertWithWhereUniqueWithoutWorkspaceInput { + where: GoalLinkWhereUniqueInput; + update: GoalLinkUpdateWithoutWorkspaceDataInput; + create: GoalLinkCreateWithoutWorkspaceInput; +} + export interface WorkspaceUpsertWithoutConceptsInput { update: WorkspaceUpdateWithoutConceptsDataInput; create: WorkspaceCreateWithoutConceptsInput; @@ -6266,6 +6740,7 @@ export interface WorkspaceUpdateWithoutConceptLinksDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -6752,6 +7227,7 @@ export interface WorkspaceUpdateWithoutCourseLinksDataInput { conceptLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -6978,6 +7454,7 @@ export interface WorkspaceCreateWithoutPointGroupsInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -7033,6 +7510,7 @@ export interface WorkspaceUpdateWithoutPointGroupsDataInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -7134,6 +7612,7 @@ export interface CourseUpdateInput { objectiveOrder?: Maybe; createdBy?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; } export interface CourseUpdateManyMutationInput { @@ -7198,6 +7677,27 @@ export interface GoalLinkUpdateManyMutationInput { text?: Maybe; } +export interface ObjectiveLinkCreateInput { + id?: Maybe; + course: CourseCreateOneWithoutObjectiveLinksInput; + goal: ConceptCreateOneInput; + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; + text?: Maybe; + createdBy: UserCreateOneInput; +} + +export interface ObjectiveLinkUpdateInput { + course?: Maybe; + goal?: Maybe; + workspace?: Maybe; + text?: Maybe; + createdBy?: Maybe; +} + +export interface ObjectiveLinkUpdateManyMutationInput { + text?: Maybe; +} + export interface PointGroupCreateInput { id?: Maybe; name: String; @@ -7347,6 +7847,7 @@ export interface WorkspaceUpdateInput { courseLinks?: Maybe; goals?: Maybe; goalLinks?: Maybe; + objectiveLinks?: Maybe; participants?: Maybe; tokens?: Maybe; mainCourse?: Maybe; @@ -7506,6 +8007,23 @@ export interface GoalLinkSubscriptionWhereInput { >; } +export interface ObjectiveLinkSubscriptionWhereInput { + mutation_in?: Maybe; + updatedFields_contains?: Maybe; + updatedFields_contains_every?: Maybe; + updatedFields_contains_some?: Maybe; + node?: Maybe; + AND?: Maybe< + ObjectiveLinkSubscriptionWhereInput[] | ObjectiveLinkSubscriptionWhereInput + >; + OR?: Maybe< + ObjectiveLinkSubscriptionWhereInput[] | ObjectiveLinkSubscriptionWhereInput + >; + NOT?: Maybe< + ObjectiveLinkSubscriptionWhereInput[] | ObjectiveLinkSubscriptionWhereInput + >; +} + export interface PointGroupSubscriptionWhereInput { mutation_in?: Maybe; updatedFields_contains?: Maybe; @@ -7969,6 +8487,15 @@ export interface WorkspacePromise extends Promise, Fragmentable { first?: Int; last?: Int; }) => T; + objectiveLinks: >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; participants: >(args?: { where?: WorkspaceParticipantWhereInput; orderBy?: WorkspaceParticipantOrderByInput; @@ -8111,6 +8638,17 @@ export interface WorkspaceSubscription first?: Int; last?: Int; }) => T; + objectiveLinks: < + T = Promise> + >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; participants: < T = Promise> >(args?: { @@ -8255,6 +8793,15 @@ export interface WorkspaceNullablePromise first?: Int; last?: Int; }) => T; + objectiveLinks: >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; participants: >(args?: { where?: WorkspaceParticipantWhereInput; orderBy?: WorkspaceParticipantOrderByInput; @@ -8672,6 +9219,15 @@ export interface CoursePromise extends Promise, Fragmentable { first?: Int; last?: Int; }) => T; + objectiveLinks: >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; } export interface CourseSubscription @@ -8742,6 +9298,17 @@ export interface CourseSubscription first?: Int; last?: Int; }) => T; + objectiveLinks: < + T = Promise> + >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; } export interface CourseNullablePromise @@ -8812,6 +9379,15 @@ export interface CourseNullablePromise first?: Int; last?: Int; }) => T; + objectiveLinks: >(args?: { + where?: ObjectiveLinkWhereInput; + orderBy?: ObjectiveLinkOrderByInput; + skip?: Int; + after?: String; + before?: String; + first?: Int; + last?: Int; + }) => T; } export interface Tag { @@ -9224,6 +9800,52 @@ export interface GoalLinkNullablePromise updatedAt: () => Promise; } +export interface ObjectiveLink { + id: ID_Output; + text?: String; + createdAt: DateTimeOutput; + updatedAt: DateTimeOutput; +} + +export interface ObjectiveLinkPromise + extends Promise, + Fragmentable { + id: () => Promise; + course: () => T; + goal: () => T; + workspace: () => T; + text: () => Promise; + createdBy: () => T; + createdAt: () => Promise; + updatedAt: () => Promise; +} + +export interface ObjectiveLinkSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + course: () => T; + goal: () => T; + workspace: () => T; + text: () => Promise>; + createdBy: () => T; + createdAt: () => Promise>; + updatedAt: () => Promise>; +} + +export interface ObjectiveLinkNullablePromise + extends Promise, + Fragmentable { + id: () => Promise; + course: () => T; + goal: () => T; + workspace: () => T; + text: () => Promise; + createdBy: () => T; + createdAt: () => Promise; + updatedAt: () => Promise; +} + export interface WorkspaceToken { id: ID_Output; privilege: Privilege; @@ -9819,6 +10441,62 @@ export interface AggregateGoalLinkSubscription count: () => Promise>; } +export interface ObjectiveLinkConnection { + pageInfo: PageInfo; + edges: ObjectiveLinkEdge[]; +} + +export interface ObjectiveLinkConnectionPromise + extends Promise, + Fragmentable { + pageInfo: () => T; + edges: >() => T; + aggregate: () => T; +} + +export interface ObjectiveLinkConnectionSubscription + extends Promise>, + Fragmentable { + pageInfo: () => T; + edges: >>() => T; + aggregate: () => T; +} + +export interface ObjectiveLinkEdge { + node: ObjectiveLink; + cursor: String; +} + +export interface ObjectiveLinkEdgePromise + extends Promise, + Fragmentable { + node: () => T; + cursor: () => Promise; +} + +export interface ObjectiveLinkEdgeSubscription + extends Promise>, + Fragmentable { + node: () => T; + cursor: () => Promise>; +} + +export interface AggregateObjectiveLink { + count: Int; +} + +export interface AggregateObjectiveLinkPromise + extends Promise, + Fragmentable { + count: () => Promise; +} + +export interface AggregateObjectiveLinkSubscription + extends Promise>, + Fragmentable { + count: () => Promise>; +} + export interface PointGroupConnection { pageInfo: PageInfo; edges: PointGroupEdge[]; @@ -10747,6 +11425,56 @@ export interface GoalLinkPreviousValuesSubscription updatedAt: () => Promise>; } +export interface ObjectiveLinkSubscriptionPayload { + mutation: MutationType; + node: ObjectiveLink; + updatedFields: String[]; + previousValues: ObjectiveLinkPreviousValues; +} + +export interface ObjectiveLinkSubscriptionPayloadPromise + extends Promise, + Fragmentable { + mutation: () => Promise; + node: () => T; + updatedFields: () => Promise; + previousValues: () => T; +} + +export interface ObjectiveLinkSubscriptionPayloadSubscription + extends Promise>, + Fragmentable { + mutation: () => Promise>; + node: () => T; + updatedFields: () => Promise>; + previousValues: () => T; +} + +export interface ObjectiveLinkPreviousValues { + id: ID_Output; + text?: String; + createdAt: DateTimeOutput; + updatedAt: DateTimeOutput; +} + +export interface ObjectiveLinkPreviousValuesPromise + extends Promise, + Fragmentable { + id: () => Promise; + text: () => Promise; + createdAt: () => Promise; + updatedAt: () => Promise; +} + +export interface ObjectiveLinkPreviousValuesSubscription + extends Promise>, + Fragmentable { + id: () => Promise>; + text: () => Promise>; + createdAt: () => Promise>; + updatedAt: () => Promise>; +} + export interface PointGroupSubscriptionPayload { mutation: MutationType; node: PointGroup; @@ -11326,6 +12054,10 @@ export const models: Model[] = [ name: "ConceptLevel", embedded: false }, + { + name: "ObjectiveLink", + embedded: false + }, { name: "GoalLink", embedded: false diff --git a/backend/schema/generated/prisma-client/index.js b/backend/schema/generated/prisma-client/index.js index 8c929fc8d..80d932a78 100644 --- a/backend/schema/generated/prisma-client/index.js +++ b/backend/schema/generated/prisma-client/index.js @@ -60,6 +60,10 @@ var models = [ name: "ConceptLevel", embedded: false }, + { + name: "ObjectiveLink", + embedded: false + }, { name: "GoalLink", embedded: false diff --git a/backend/schema/generated/prisma-client/prisma-schema.js b/backend/schema/generated/prisma-client/prisma-schema.js index 4a3107538..840b103e6 100644 --- a/backend/schema/generated/prisma-client/prisma-schema.js +++ b/backend/schema/generated/prisma-client/prisma-schema.js @@ -1,5 +1,5 @@ module.exports = { - typeDefs: // Code generated by Prisma (prisma@1.34.10). DO NOT EDIT. + typeDefs: // Code generated by Prisma (prisma@1.34.8). DO NOT EDIT. // Please don't change this file manually but run `prisma generate` to update it. // For more information, please read the docs: https://www.prisma.io/docs/prisma-client/ @@ -329,6 +329,10 @@ type AggregateGoalLink { count: Int! } +type AggregateObjectiveLink { + count: Int! +} + type AggregatePointGroup { count: Int! } @@ -1957,6 +1961,7 @@ type Course { createdAt: DateTime! updatedAt: DateTime! goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink!] + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink!] } type CourseConnection { @@ -1985,6 +1990,7 @@ input CourseCreateInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateManyWithoutSourceCourseInput { @@ -2031,6 +2037,11 @@ input CourseCreateOneWithoutLinksToCourseInput { connect: CourseWhereUniqueInput } +input CourseCreateOneWithoutObjectiveLinksInput { + create: CourseCreateWithoutObjectiveLinksInput + connect: CourseWhereUniqueInput +} + input CourseCreateWithoutClonesInput { id: ID name: String! @@ -2046,6 +2057,7 @@ input CourseCreateWithoutClonesInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutConceptsInput { @@ -2063,6 +2075,7 @@ input CourseCreateWithoutConceptsInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutGoalLinksInput { @@ -2080,6 +2093,7 @@ input CourseCreateWithoutGoalLinksInput { conceptOrder: CourseCreateconceptOrderInput objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutLinksFromCourseInput { @@ -2097,6 +2111,7 @@ input CourseCreateWithoutLinksFromCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutLinksToCourseInput { @@ -2114,6 +2129,25 @@ input CourseCreateWithoutLinksToCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput +} + +input CourseCreateWithoutObjectiveLinksInput { + id: ID + name: String! + official: Boolean + frozen: Boolean + tags: TagCreateManyInput + sourceCourse: CourseCreateOneWithoutClonesInput + clones: CourseCreateManyWithoutSourceCourseInput + linksFromCourse: CourseLinkCreateManyWithoutFromInput + linksToCourse: CourseLinkCreateManyWithoutToInput + workspace: WorkspaceCreateOneWithoutCoursesInput! + concepts: ConceptCreateManyWithoutCourseInput + conceptOrder: CourseCreateconceptOrderInput + objectiveOrder: CourseCreateobjectiveOrderInput + createdBy: UserCreateOneInput! + goalLinks: GoalLinkCreateManyWithoutCourseInput } input CourseCreateWithoutSourceCourseInput { @@ -2131,6 +2165,7 @@ input CourseCreateWithoutSourceCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutWorkspaceInput { @@ -2148,6 +2183,7 @@ input CourseCreateWithoutWorkspaceInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } type CourseEdge { @@ -2693,6 +2729,7 @@ input CourseUpdateDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateInput { @@ -2710,6 +2747,7 @@ input CourseUpdateInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateManyDataInput { @@ -2798,6 +2836,13 @@ input CourseUpdateOneRequiredWithoutLinksToCourseInput { connect: CourseWhereUniqueInput } +input CourseUpdateOneRequiredWithoutObjectiveLinksInput { + create: CourseCreateWithoutObjectiveLinksInput + update: CourseUpdateWithoutObjectiveLinksDataInput + upsert: CourseUpsertWithoutObjectiveLinksInput + connect: CourseWhereUniqueInput +} + input CourseUpdateOneWithoutClonesInput { create: CourseCreateWithoutClonesInput update: CourseUpdateWithoutClonesDataInput @@ -2830,6 +2875,7 @@ input CourseUpdateWithoutClonesDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutConceptsDataInput { @@ -2846,6 +2892,7 @@ input CourseUpdateWithoutConceptsDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutGoalLinksDataInput { @@ -2862,6 +2909,7 @@ input CourseUpdateWithoutGoalLinksDataInput { conceptOrder: CourseUpdateconceptOrderInput objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutLinksFromCourseDataInput { @@ -2878,6 +2926,7 @@ input CourseUpdateWithoutLinksFromCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutLinksToCourseDataInput { @@ -2894,6 +2943,24 @@ input CourseUpdateWithoutLinksToCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput +} + +input CourseUpdateWithoutObjectiveLinksDataInput { + name: String + official: Boolean + frozen: Boolean + tags: TagUpdateManyInput + sourceCourse: CourseUpdateOneWithoutClonesInput + clones: CourseUpdateManyWithoutSourceCourseInput + linksFromCourse: CourseLinkUpdateManyWithoutFromInput + linksToCourse: CourseLinkUpdateManyWithoutToInput + workspace: WorkspaceUpdateOneRequiredWithoutCoursesInput + concepts: ConceptUpdateManyWithoutCourseInput + conceptOrder: CourseUpdateconceptOrderInput + objectiveOrder: CourseUpdateobjectiveOrderInput + createdBy: UserUpdateOneRequiredInput + goalLinks: GoalLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutSourceCourseDataInput { @@ -2910,6 +2977,7 @@ input CourseUpdateWithoutSourceCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutWorkspaceDataInput { @@ -2926,6 +2994,7 @@ input CourseUpdateWithoutWorkspaceDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithWhereUniqueWithoutSourceCourseInput { @@ -2968,6 +3037,11 @@ input CourseUpsertWithoutLinksToCourseInput { create: CourseCreateWithoutLinksToCourseInput! } +input CourseUpsertWithoutObjectiveLinksInput { + update: CourseUpdateWithoutObjectiveLinksDataInput! + create: CourseCreateWithoutObjectiveLinksInput! +} + input CourseUpsertWithWhereUniqueWithoutSourceCourseInput { where: CourseWhereUniqueInput! update: CourseUpdateWithoutSourceCourseDataInput! @@ -3050,6 +3124,9 @@ input CourseWhereInput { goalLinks_every: GoalLinkWhereInput goalLinks_some: GoalLinkWhereInput goalLinks_none: GoalLinkWhereInput + objectiveLinks_every: ObjectiveLinkWhereInput + objectiveLinks_some: ObjectiveLinkWhereInput + objectiveLinks_none: ObjectiveLinkWhereInput AND: [CourseWhereInput!] OR: [CourseWhereInput!] NOT: [CourseWhereInput!] @@ -3388,6 +3465,12 @@ type Mutation { upsertGoalLink(where: GoalLinkWhereUniqueInput!, create: GoalLinkCreateInput!, update: GoalLinkUpdateInput!): GoalLink! deleteGoalLink(where: GoalLinkWhereUniqueInput!): GoalLink deleteManyGoalLinks(where: GoalLinkWhereInput): BatchPayload! + createObjectiveLink(data: ObjectiveLinkCreateInput!): ObjectiveLink! + updateObjectiveLink(data: ObjectiveLinkUpdateInput!, where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + updateManyObjectiveLinks(data: ObjectiveLinkUpdateManyMutationInput!, where: ObjectiveLinkWhereInput): BatchPayload! + upsertObjectiveLink(where: ObjectiveLinkWhereUniqueInput!, create: ObjectiveLinkCreateInput!, update: ObjectiveLinkUpdateInput!): ObjectiveLink! + deleteObjectiveLink(where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + deleteManyObjectiveLinks(where: ObjectiveLinkWhereInput): BatchPayload! createPointGroup(data: PointGroupCreateInput!): PointGroup! updatePointGroup(data: PointGroupUpdateInput!, where: PointGroupWhereUniqueInput!): PointGroup updateManyPointGroups(data: PointGroupUpdateManyMutationInput!, where: PointGroupWhereInput): BatchPayload! @@ -3454,6 +3537,288 @@ interface Node { id: ID! } +type ObjectiveLink { + id: ID! + course: Course! + goal: Concept! + workspace: Workspace! + text: String + createdBy: User! + createdAt: DateTime! + updatedAt: DateTime! +} + +type ObjectiveLinkConnection { + pageInfo: PageInfo! + edges: [ObjectiveLinkEdge]! + aggregate: AggregateObjectiveLink! +} + +input ObjectiveLinkCreateInput { + id: ID + course: CourseCreateOneWithoutObjectiveLinksInput! + goal: ConceptCreateOneInput! + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! + text: String + createdBy: UserCreateOneInput! +} + +input ObjectiveLinkCreateManyWithoutCourseInput { + create: [ObjectiveLinkCreateWithoutCourseInput!] + connect: [ObjectiveLinkWhereUniqueInput!] +} + +input ObjectiveLinkCreateManyWithoutWorkspaceInput { + create: [ObjectiveLinkCreateWithoutWorkspaceInput!] + connect: [ObjectiveLinkWhereUniqueInput!] +} + +input ObjectiveLinkCreateWithoutCourseInput { + id: ID + goal: ConceptCreateOneInput! + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! + text: String + createdBy: UserCreateOneInput! +} + +input ObjectiveLinkCreateWithoutWorkspaceInput { + id: ID + course: CourseCreateOneWithoutObjectiveLinksInput! + goal: ConceptCreateOneInput! + text: String + createdBy: UserCreateOneInput! +} + +type ObjectiveLinkEdge { + node: ObjectiveLink! + cursor: String! +} + +enum ObjectiveLinkOrderByInput { + id_ASC + id_DESC + text_ASC + text_DESC + createdAt_ASC + createdAt_DESC + updatedAt_ASC + updatedAt_DESC +} + +type ObjectiveLinkPreviousValues { + id: ID! + text: String + createdAt: DateTime! + updatedAt: DateTime! +} + +input ObjectiveLinkScalarWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + text: String + text_not: String + text_in: [String!] + text_not_in: [String!] + text_lt: String + text_lte: String + text_gt: String + text_gte: String + text_contains: String + text_not_contains: String + text_starts_with: String + text_not_starts_with: String + text_ends_with: String + text_not_ends_with: String + createdAt: DateTime + createdAt_not: DateTime + createdAt_in: [DateTime!] + createdAt_not_in: [DateTime!] + createdAt_lt: DateTime + createdAt_lte: DateTime + createdAt_gt: DateTime + createdAt_gte: DateTime + updatedAt: DateTime + updatedAt_not: DateTime + updatedAt_in: [DateTime!] + updatedAt_not_in: [DateTime!] + updatedAt_lt: DateTime + updatedAt_lte: DateTime + updatedAt_gt: DateTime + updatedAt_gte: DateTime + AND: [ObjectiveLinkScalarWhereInput!] + OR: [ObjectiveLinkScalarWhereInput!] + NOT: [ObjectiveLinkScalarWhereInput!] +} + +type ObjectiveLinkSubscriptionPayload { + mutation: MutationType! + node: ObjectiveLink + updatedFields: [String!] + previousValues: ObjectiveLinkPreviousValues +} + +input ObjectiveLinkSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: ObjectiveLinkWhereInput + AND: [ObjectiveLinkSubscriptionWhereInput!] + OR: [ObjectiveLinkSubscriptionWhereInput!] + NOT: [ObjectiveLinkSubscriptionWhereInput!] +} + +input ObjectiveLinkUpdateInput { + course: CourseUpdateOneRequiredWithoutObjectiveLinksInput + goal: ConceptUpdateOneRequiredInput + workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateManyDataInput { + text: String +} + +input ObjectiveLinkUpdateManyMutationInput { + text: String +} + +input ObjectiveLinkUpdateManyWithoutCourseInput { + create: [ObjectiveLinkCreateWithoutCourseInput!] + delete: [ObjectiveLinkWhereUniqueInput!] + connect: [ObjectiveLinkWhereUniqueInput!] + set: [ObjectiveLinkWhereUniqueInput!] + disconnect: [ObjectiveLinkWhereUniqueInput!] + update: [ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput!] + upsert: [ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput!] + deleteMany: [ObjectiveLinkScalarWhereInput!] + updateMany: [ObjectiveLinkUpdateManyWithWhereNestedInput!] +} + +input ObjectiveLinkUpdateManyWithoutWorkspaceInput { + create: [ObjectiveLinkCreateWithoutWorkspaceInput!] + delete: [ObjectiveLinkWhereUniqueInput!] + connect: [ObjectiveLinkWhereUniqueInput!] + set: [ObjectiveLinkWhereUniqueInput!] + disconnect: [ObjectiveLinkWhereUniqueInput!] + update: [ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput!] + upsert: [ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput!] + deleteMany: [ObjectiveLinkScalarWhereInput!] + updateMany: [ObjectiveLinkUpdateManyWithWhereNestedInput!] +} + +input ObjectiveLinkUpdateManyWithWhereNestedInput { + where: ObjectiveLinkScalarWhereInput! + data: ObjectiveLinkUpdateManyDataInput! +} + +input ObjectiveLinkUpdateWithoutCourseDataInput { + goal: ConceptUpdateOneRequiredInput + workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateWithoutWorkspaceDataInput { + course: CourseUpdateOneRequiredWithoutObjectiveLinksInput + goal: ConceptUpdateOneRequiredInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput! + data: ObjectiveLinkUpdateWithoutCourseDataInput! +} + +input ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput! + data: ObjectiveLinkUpdateWithoutWorkspaceDataInput! +} + +input ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput! + update: ObjectiveLinkUpdateWithoutCourseDataInput! + create: ObjectiveLinkCreateWithoutCourseInput! +} + +input ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput! + update: ObjectiveLinkUpdateWithoutWorkspaceDataInput! + create: ObjectiveLinkCreateWithoutWorkspaceInput! +} + +input ObjectiveLinkWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + course: CourseWhereInput + goal: ConceptWhereInput + workspace: WorkspaceWhereInput + text: String + text_not: String + text_in: [String!] + text_not_in: [String!] + text_lt: String + text_lte: String + text_gt: String + text_gte: String + text_contains: String + text_not_contains: String + text_starts_with: String + text_not_starts_with: String + text_ends_with: String + text_not_ends_with: String + createdBy: UserWhereInput + createdAt: DateTime + createdAt_not: DateTime + createdAt_in: [DateTime!] + createdAt_not_in: [DateTime!] + createdAt_lt: DateTime + createdAt_lte: DateTime + createdAt_gt: DateTime + createdAt_gte: DateTime + updatedAt: DateTime + updatedAt_not: DateTime + updatedAt_in: [DateTime!] + updatedAt_not_in: [DateTime!] + updatedAt_lt: DateTime + updatedAt_lte: DateTime + updatedAt_gt: DateTime + updatedAt_gte: DateTime + AND: [ObjectiveLinkWhereInput!] + OR: [ObjectiveLinkWhereInput!] + NOT: [ObjectiveLinkWhereInput!] +} + +input ObjectiveLinkWhereUniqueInput { + id: ID +} + type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! @@ -4740,6 +5105,9 @@ type Query { goalLink(where: GoalLinkWhereUniqueInput!): GoalLink goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink]! goalLinksConnection(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): GoalLinkConnection! + objectiveLink(where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink]! + objectiveLinksConnection(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): ObjectiveLinkConnection! pointGroup(where: PointGroupWhereUniqueInput!): PointGroup pointGroups(where: PointGroupWhereInput, orderBy: PointGroupOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [PointGroup]! pointGroupsConnection(where: PointGroupWhereInput, orderBy: PointGroupOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): PointGroupConnection! @@ -4785,6 +5153,7 @@ type Subscription { course(where: CourseSubscriptionWhereInput): CourseSubscriptionPayload courseLink(where: CourseLinkSubscriptionWhereInput): CourseLinkSubscriptionPayload goalLink(where: GoalLinkSubscriptionWhereInput): GoalLinkSubscriptionPayload + objectiveLink(where: ObjectiveLinkSubscriptionWhereInput): ObjectiveLinkSubscriptionPayload pointGroup(where: PointGroupSubscriptionWhereInput): PointGroupSubscriptionPayload project(where: ProjectSubscriptionWhereInput): ProjectSubscriptionPayload projectParticipant(where: ProjectParticipantSubscriptionWhereInput): ProjectParticipantSubscriptionPayload @@ -5455,6 +5824,7 @@ type Workspace { courseLinks(where: CourseLinkWhereInput, orderBy: CourseLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [CourseLink!] goals(where: ConceptWhereInput, orderBy: ConceptOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Concept!] goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink!] + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink!] participants(where: WorkspaceParticipantWhereInput, orderBy: WorkspaceParticipantOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [WorkspaceParticipant!] tokens(where: WorkspaceTokenWhereInput, orderBy: WorkspaceTokenOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [WorkspaceToken!] mainCourse: Course @@ -5493,6 +5863,7 @@ input WorkspaceCreateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5558,6 +5929,11 @@ input WorkspaceCreateOneWithoutGoalLinksInput { connect: WorkspaceWhereUniqueInput } +input WorkspaceCreateOneWithoutObjectiveLinksInput { + create: WorkspaceCreateWithoutObjectiveLinksInput + connect: WorkspaceWhereUniqueInput +} + input WorkspaceCreateOneWithoutParticipantsInput { create: WorkspaceCreateWithoutParticipantsInput connect: WorkspaceWhereUniqueInput @@ -5588,6 +5964,7 @@ input WorkspaceCreateWithoutAsMergeInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5613,6 +5990,7 @@ input WorkspaceCreateWithoutAsTemplateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5638,6 +6016,7 @@ input WorkspaceCreateWithoutClonesInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5663,6 +6042,7 @@ input WorkspaceCreateWithoutConceptLinksInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5688,6 +6068,7 @@ input WorkspaceCreateWithoutConceptsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5713,6 +6094,7 @@ input WorkspaceCreateWithoutCourseLinksInput { conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5738,6 +6120,7 @@ input WorkspaceCreateWithoutCoursesInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5763,6 +6146,33 @@ input WorkspaceCreateWithoutGoalLinksInput { conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput + participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput + tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput + mainCourse: CourseCreateOneInput + pointGroups: PointGroupCreateManyWithoutWorkspaceInput + courseTags: TagCreateManyInput + conceptTags: TagCreateManyInput + goalTags: TagCreateManyInput + createdBy: UserCreateOneInput +} + +input WorkspaceCreateWithoutObjectiveLinksInput { + id: ID + name: String! + sourceProject: ProjectCreateOneWithoutWorkspacesInput + sourceTemplate: WorkspaceCreateOneWithoutClonesInput + asMerge: ProjectCreateOneWithoutMergesInput + asTemplate: ProjectCreateOneWithoutTemplatesInput + clones: WorkspaceCreateManyWithoutSourceTemplateInput + courses: CourseCreateManyWithoutWorkspaceInput + courseOrder: WorkspaceCreatecourseOrderInput + concepts: ConceptCreateManyWithoutWorkspaceInput + commonConcepts: ConceptCreateManyInput + conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput + courseLinks: CourseLinkCreateManyWithoutWorkspaceInput + goals: ConceptCreateManyInput + goalLinks: GoalLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5789,6 +6199,7 @@ input WorkspaceCreateWithoutParticipantsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput pointGroups: PointGroupCreateManyWithoutWorkspaceInput @@ -5814,6 +6225,7 @@ input WorkspaceCreateWithoutPointGroupsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5838,6 +6250,7 @@ input WorkspaceCreateWithoutSourceProjectInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5863,6 +6276,7 @@ input WorkspaceCreateWithoutSourceTemplateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5889,6 +6303,7 @@ input WorkspaceCreateWithoutTokensInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput pointGroups: PointGroupCreateManyWithoutWorkspaceInput @@ -6519,6 +6934,7 @@ input WorkspaceUpdateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6544,6 +6960,7 @@ input WorkspaceUpdateInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6661,6 +7078,13 @@ input WorkspaceUpdateOneRequiredWithoutGoalLinksInput { connect: WorkspaceWhereUniqueInput } +input WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput { + create: WorkspaceCreateWithoutObjectiveLinksInput + update: WorkspaceUpdateWithoutObjectiveLinksDataInput + upsert: WorkspaceUpsertWithoutObjectiveLinksInput + connect: WorkspaceWhereUniqueInput +} + input WorkspaceUpdateOneRequiredWithoutParticipantsInput { create: WorkspaceCreateWithoutParticipantsInput update: WorkspaceUpdateWithoutParticipantsDataInput @@ -6705,6 +7129,7 @@ input WorkspaceUpdateWithoutAsMergeDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6729,6 +7154,7 @@ input WorkspaceUpdateWithoutAsTemplateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6753,6 +7179,7 @@ input WorkspaceUpdateWithoutClonesDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6777,6 +7204,7 @@ input WorkspaceUpdateWithoutConceptLinksDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6801,6 +7229,7 @@ input WorkspaceUpdateWithoutConceptsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6825,6 +7254,7 @@ input WorkspaceUpdateWithoutCourseLinksDataInput { conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6849,6 +7279,7 @@ input WorkspaceUpdateWithoutCoursesDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6873,6 +7304,32 @@ input WorkspaceUpdateWithoutGoalLinksDataInput { conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput + participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput + tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput + mainCourse: CourseUpdateOneInput + pointGroups: PointGroupUpdateManyWithoutWorkspaceInput + courseTags: TagUpdateManyInput + conceptTags: TagUpdateManyInput + goalTags: TagUpdateManyInput + createdBy: UserUpdateOneInput +} + +input WorkspaceUpdateWithoutObjectiveLinksDataInput { + name: String + sourceProject: ProjectUpdateOneWithoutWorkspacesInput + sourceTemplate: WorkspaceUpdateOneWithoutClonesInput + asMerge: ProjectUpdateOneWithoutMergesInput + asTemplate: ProjectUpdateOneWithoutTemplatesInput + clones: WorkspaceUpdateManyWithoutSourceTemplateInput + courses: CourseUpdateManyWithoutWorkspaceInput + courseOrder: WorkspaceUpdatecourseOrderInput + concepts: ConceptUpdateManyWithoutWorkspaceInput + commonConcepts: ConceptUpdateManyInput + conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput + courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput + goals: ConceptUpdateManyInput + goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6898,6 +7355,7 @@ input WorkspaceUpdateWithoutParticipantsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput pointGroups: PointGroupUpdateManyWithoutWorkspaceInput @@ -6922,6 +7380,7 @@ input WorkspaceUpdateWithoutPointGroupsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6945,6 +7404,7 @@ input WorkspaceUpdateWithoutSourceProjectDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6969,6 +7429,7 @@ input WorkspaceUpdateWithoutSourceTemplateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6994,6 +7455,7 @@ input WorkspaceUpdateWithoutTokensDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput pointGroups: PointGroupUpdateManyWithoutWorkspaceInput @@ -7058,6 +7520,11 @@ input WorkspaceUpsertWithoutGoalLinksInput { create: WorkspaceCreateWithoutGoalLinksInput! } +input WorkspaceUpsertWithoutObjectiveLinksInput { + update: WorkspaceUpdateWithoutObjectiveLinksDataInput! + create: WorkspaceCreateWithoutObjectiveLinksInput! +} + input WorkspaceUpsertWithoutParticipantsInput { update: WorkspaceUpdateWithoutParticipantsDataInput! create: WorkspaceCreateWithoutParticipantsInput! @@ -7154,6 +7621,9 @@ input WorkspaceWhereInput { goalLinks_every: GoalLinkWhereInput goalLinks_some: GoalLinkWhereInput goalLinks_none: GoalLinkWhereInput + objectiveLinks_every: ObjectiveLinkWhereInput + objectiveLinks_some: ObjectiveLinkWhereInput + objectiveLinks_none: ObjectiveLinkWhereInput participants_every: WorkspaceParticipantWhereInput participants_some: WorkspaceParticipantWhereInput participants_none: WorkspaceParticipantWhereInput diff --git a/backend/schema/generated/prisma-client/prisma.graphql b/backend/schema/generated/prisma-client/prisma.graphql index b0ffaaf69..426b74228 100644 --- a/backend/schema/generated/prisma-client/prisma.graphql +++ b/backend/schema/generated/prisma-client/prisma.graphql @@ -324,6 +324,10 @@ type AggregateGoalLink { count: Int! } +type AggregateObjectiveLink { + count: Int! +} + type AggregatePointGroup { count: Int! } @@ -1952,6 +1956,7 @@ type Course { createdAt: DateTime! updatedAt: DateTime! goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink!] + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink!] } type CourseConnection { @@ -1980,6 +1985,7 @@ input CourseCreateInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateManyWithoutSourceCourseInput { @@ -2026,6 +2032,11 @@ input CourseCreateOneWithoutLinksToCourseInput { connect: CourseWhereUniqueInput } +input CourseCreateOneWithoutObjectiveLinksInput { + create: CourseCreateWithoutObjectiveLinksInput + connect: CourseWhereUniqueInput +} + input CourseCreateWithoutClonesInput { id: ID name: String! @@ -2041,6 +2052,7 @@ input CourseCreateWithoutClonesInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutConceptsInput { @@ -2058,6 +2070,7 @@ input CourseCreateWithoutConceptsInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutGoalLinksInput { @@ -2075,6 +2088,7 @@ input CourseCreateWithoutGoalLinksInput { conceptOrder: CourseCreateconceptOrderInput objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutLinksFromCourseInput { @@ -2092,6 +2106,7 @@ input CourseCreateWithoutLinksFromCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutLinksToCourseInput { @@ -2109,6 +2124,25 @@ input CourseCreateWithoutLinksToCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput +} + +input CourseCreateWithoutObjectiveLinksInput { + id: ID + name: String! + official: Boolean + frozen: Boolean + tags: TagCreateManyInput + sourceCourse: CourseCreateOneWithoutClonesInput + clones: CourseCreateManyWithoutSourceCourseInput + linksFromCourse: CourseLinkCreateManyWithoutFromInput + linksToCourse: CourseLinkCreateManyWithoutToInput + workspace: WorkspaceCreateOneWithoutCoursesInput! + concepts: ConceptCreateManyWithoutCourseInput + conceptOrder: CourseCreateconceptOrderInput + objectiveOrder: CourseCreateobjectiveOrderInput + createdBy: UserCreateOneInput! + goalLinks: GoalLinkCreateManyWithoutCourseInput } input CourseCreateWithoutSourceCourseInput { @@ -2126,6 +2160,7 @@ input CourseCreateWithoutSourceCourseInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } input CourseCreateWithoutWorkspaceInput { @@ -2143,6 +2178,7 @@ input CourseCreateWithoutWorkspaceInput { objectiveOrder: CourseCreateobjectiveOrderInput createdBy: UserCreateOneInput! goalLinks: GoalLinkCreateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkCreateManyWithoutCourseInput } type CourseEdge { @@ -2688,6 +2724,7 @@ input CourseUpdateDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateInput { @@ -2705,6 +2742,7 @@ input CourseUpdateInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateManyDataInput { @@ -2793,6 +2831,13 @@ input CourseUpdateOneRequiredWithoutLinksToCourseInput { connect: CourseWhereUniqueInput } +input CourseUpdateOneRequiredWithoutObjectiveLinksInput { + create: CourseCreateWithoutObjectiveLinksInput + update: CourseUpdateWithoutObjectiveLinksDataInput + upsert: CourseUpsertWithoutObjectiveLinksInput + connect: CourseWhereUniqueInput +} + input CourseUpdateOneWithoutClonesInput { create: CourseCreateWithoutClonesInput update: CourseUpdateWithoutClonesDataInput @@ -2825,6 +2870,7 @@ input CourseUpdateWithoutClonesDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutConceptsDataInput { @@ -2841,6 +2887,7 @@ input CourseUpdateWithoutConceptsDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutGoalLinksDataInput { @@ -2857,6 +2904,7 @@ input CourseUpdateWithoutGoalLinksDataInput { conceptOrder: CourseUpdateconceptOrderInput objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutLinksFromCourseDataInput { @@ -2873,6 +2921,7 @@ input CourseUpdateWithoutLinksFromCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutLinksToCourseDataInput { @@ -2889,6 +2938,24 @@ input CourseUpdateWithoutLinksToCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput +} + +input CourseUpdateWithoutObjectiveLinksDataInput { + name: String + official: Boolean + frozen: Boolean + tags: TagUpdateManyInput + sourceCourse: CourseUpdateOneWithoutClonesInput + clones: CourseUpdateManyWithoutSourceCourseInput + linksFromCourse: CourseLinkUpdateManyWithoutFromInput + linksToCourse: CourseLinkUpdateManyWithoutToInput + workspace: WorkspaceUpdateOneRequiredWithoutCoursesInput + concepts: ConceptUpdateManyWithoutCourseInput + conceptOrder: CourseUpdateconceptOrderInput + objectiveOrder: CourseUpdateobjectiveOrderInput + createdBy: UserUpdateOneRequiredInput + goalLinks: GoalLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutSourceCourseDataInput { @@ -2905,6 +2972,7 @@ input CourseUpdateWithoutSourceCourseDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithoutWorkspaceDataInput { @@ -2921,6 +2989,7 @@ input CourseUpdateWithoutWorkspaceDataInput { objectiveOrder: CourseUpdateobjectiveOrderInput createdBy: UserUpdateOneRequiredInput goalLinks: GoalLinkUpdateManyWithoutCourseInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutCourseInput } input CourseUpdateWithWhereUniqueWithoutSourceCourseInput { @@ -2963,6 +3032,11 @@ input CourseUpsertWithoutLinksToCourseInput { create: CourseCreateWithoutLinksToCourseInput! } +input CourseUpsertWithoutObjectiveLinksInput { + update: CourseUpdateWithoutObjectiveLinksDataInput! + create: CourseCreateWithoutObjectiveLinksInput! +} + input CourseUpsertWithWhereUniqueWithoutSourceCourseInput { where: CourseWhereUniqueInput! update: CourseUpdateWithoutSourceCourseDataInput! @@ -3045,6 +3119,9 @@ input CourseWhereInput { goalLinks_every: GoalLinkWhereInput goalLinks_some: GoalLinkWhereInput goalLinks_none: GoalLinkWhereInput + objectiveLinks_every: ObjectiveLinkWhereInput + objectiveLinks_some: ObjectiveLinkWhereInput + objectiveLinks_none: ObjectiveLinkWhereInput AND: [CourseWhereInput!] OR: [CourseWhereInput!] NOT: [CourseWhereInput!] @@ -3383,6 +3460,12 @@ type Mutation { upsertGoalLink(where: GoalLinkWhereUniqueInput!, create: GoalLinkCreateInput!, update: GoalLinkUpdateInput!): GoalLink! deleteGoalLink(where: GoalLinkWhereUniqueInput!): GoalLink deleteManyGoalLinks(where: GoalLinkWhereInput): BatchPayload! + createObjectiveLink(data: ObjectiveLinkCreateInput!): ObjectiveLink! + updateObjectiveLink(data: ObjectiveLinkUpdateInput!, where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + updateManyObjectiveLinks(data: ObjectiveLinkUpdateManyMutationInput!, where: ObjectiveLinkWhereInput): BatchPayload! + upsertObjectiveLink(where: ObjectiveLinkWhereUniqueInput!, create: ObjectiveLinkCreateInput!, update: ObjectiveLinkUpdateInput!): ObjectiveLink! + deleteObjectiveLink(where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + deleteManyObjectiveLinks(where: ObjectiveLinkWhereInput): BatchPayload! createPointGroup(data: PointGroupCreateInput!): PointGroup! updatePointGroup(data: PointGroupUpdateInput!, where: PointGroupWhereUniqueInput!): PointGroup updateManyPointGroups(data: PointGroupUpdateManyMutationInput!, where: PointGroupWhereInput): BatchPayload! @@ -3449,6 +3532,288 @@ interface Node { id: ID! } +type ObjectiveLink { + id: ID! + course: Course! + goal: Concept! + workspace: Workspace! + text: String + createdBy: User! + createdAt: DateTime! + updatedAt: DateTime! +} + +type ObjectiveLinkConnection { + pageInfo: PageInfo! + edges: [ObjectiveLinkEdge]! + aggregate: AggregateObjectiveLink! +} + +input ObjectiveLinkCreateInput { + id: ID + course: CourseCreateOneWithoutObjectiveLinksInput! + goal: ConceptCreateOneInput! + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! + text: String + createdBy: UserCreateOneInput! +} + +input ObjectiveLinkCreateManyWithoutCourseInput { + create: [ObjectiveLinkCreateWithoutCourseInput!] + connect: [ObjectiveLinkWhereUniqueInput!] +} + +input ObjectiveLinkCreateManyWithoutWorkspaceInput { + create: [ObjectiveLinkCreateWithoutWorkspaceInput!] + connect: [ObjectiveLinkWhereUniqueInput!] +} + +input ObjectiveLinkCreateWithoutCourseInput { + id: ID + goal: ConceptCreateOneInput! + workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! + text: String + createdBy: UserCreateOneInput! +} + +input ObjectiveLinkCreateWithoutWorkspaceInput { + id: ID + course: CourseCreateOneWithoutObjectiveLinksInput! + goal: ConceptCreateOneInput! + text: String + createdBy: UserCreateOneInput! +} + +type ObjectiveLinkEdge { + node: ObjectiveLink! + cursor: String! +} + +enum ObjectiveLinkOrderByInput { + id_ASC + id_DESC + text_ASC + text_DESC + createdAt_ASC + createdAt_DESC + updatedAt_ASC + updatedAt_DESC +} + +type ObjectiveLinkPreviousValues { + id: ID! + text: String + createdAt: DateTime! + updatedAt: DateTime! +} + +input ObjectiveLinkScalarWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + text: String + text_not: String + text_in: [String!] + text_not_in: [String!] + text_lt: String + text_lte: String + text_gt: String + text_gte: String + text_contains: String + text_not_contains: String + text_starts_with: String + text_not_starts_with: String + text_ends_with: String + text_not_ends_with: String + createdAt: DateTime + createdAt_not: DateTime + createdAt_in: [DateTime!] + createdAt_not_in: [DateTime!] + createdAt_lt: DateTime + createdAt_lte: DateTime + createdAt_gt: DateTime + createdAt_gte: DateTime + updatedAt: DateTime + updatedAt_not: DateTime + updatedAt_in: [DateTime!] + updatedAt_not_in: [DateTime!] + updatedAt_lt: DateTime + updatedAt_lte: DateTime + updatedAt_gt: DateTime + updatedAt_gte: DateTime + AND: [ObjectiveLinkScalarWhereInput!] + OR: [ObjectiveLinkScalarWhereInput!] + NOT: [ObjectiveLinkScalarWhereInput!] +} + +type ObjectiveLinkSubscriptionPayload { + mutation: MutationType! + node: ObjectiveLink + updatedFields: [String!] + previousValues: ObjectiveLinkPreviousValues +} + +input ObjectiveLinkSubscriptionWhereInput { + mutation_in: [MutationType!] + updatedFields_contains: String + updatedFields_contains_every: [String!] + updatedFields_contains_some: [String!] + node: ObjectiveLinkWhereInput + AND: [ObjectiveLinkSubscriptionWhereInput!] + OR: [ObjectiveLinkSubscriptionWhereInput!] + NOT: [ObjectiveLinkSubscriptionWhereInput!] +} + +input ObjectiveLinkUpdateInput { + course: CourseUpdateOneRequiredWithoutObjectiveLinksInput + goal: ConceptUpdateOneRequiredInput + workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateManyDataInput { + text: String +} + +input ObjectiveLinkUpdateManyMutationInput { + text: String +} + +input ObjectiveLinkUpdateManyWithoutCourseInput { + create: [ObjectiveLinkCreateWithoutCourseInput!] + delete: [ObjectiveLinkWhereUniqueInput!] + connect: [ObjectiveLinkWhereUniqueInput!] + set: [ObjectiveLinkWhereUniqueInput!] + disconnect: [ObjectiveLinkWhereUniqueInput!] + update: [ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput!] + upsert: [ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput!] + deleteMany: [ObjectiveLinkScalarWhereInput!] + updateMany: [ObjectiveLinkUpdateManyWithWhereNestedInput!] +} + +input ObjectiveLinkUpdateManyWithoutWorkspaceInput { + create: [ObjectiveLinkCreateWithoutWorkspaceInput!] + delete: [ObjectiveLinkWhereUniqueInput!] + connect: [ObjectiveLinkWhereUniqueInput!] + set: [ObjectiveLinkWhereUniqueInput!] + disconnect: [ObjectiveLinkWhereUniqueInput!] + update: [ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput!] + upsert: [ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput!] + deleteMany: [ObjectiveLinkScalarWhereInput!] + updateMany: [ObjectiveLinkUpdateManyWithWhereNestedInput!] +} + +input ObjectiveLinkUpdateManyWithWhereNestedInput { + where: ObjectiveLinkScalarWhereInput! + data: ObjectiveLinkUpdateManyDataInput! +} + +input ObjectiveLinkUpdateWithoutCourseDataInput { + goal: ConceptUpdateOneRequiredInput + workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateWithoutWorkspaceDataInput { + course: CourseUpdateOneRequiredWithoutObjectiveLinksInput + goal: ConceptUpdateOneRequiredInput + text: String + createdBy: UserUpdateOneRequiredInput +} + +input ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput! + data: ObjectiveLinkUpdateWithoutCourseDataInput! +} + +input ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput! + data: ObjectiveLinkUpdateWithoutWorkspaceDataInput! +} + +input ObjectiveLinkUpsertWithWhereUniqueWithoutCourseInput { + where: ObjectiveLinkWhereUniqueInput! + update: ObjectiveLinkUpdateWithoutCourseDataInput! + create: ObjectiveLinkCreateWithoutCourseInput! +} + +input ObjectiveLinkUpsertWithWhereUniqueWithoutWorkspaceInput { + where: ObjectiveLinkWhereUniqueInput! + update: ObjectiveLinkUpdateWithoutWorkspaceDataInput! + create: ObjectiveLinkCreateWithoutWorkspaceInput! +} + +input ObjectiveLinkWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + id_lt: ID + id_lte: ID + id_gt: ID + id_gte: ID + id_contains: ID + id_not_contains: ID + id_starts_with: ID + id_not_starts_with: ID + id_ends_with: ID + id_not_ends_with: ID + course: CourseWhereInput + goal: ConceptWhereInput + workspace: WorkspaceWhereInput + text: String + text_not: String + text_in: [String!] + text_not_in: [String!] + text_lt: String + text_lte: String + text_gt: String + text_gte: String + text_contains: String + text_not_contains: String + text_starts_with: String + text_not_starts_with: String + text_ends_with: String + text_not_ends_with: String + createdBy: UserWhereInput + createdAt: DateTime + createdAt_not: DateTime + createdAt_in: [DateTime!] + createdAt_not_in: [DateTime!] + createdAt_lt: DateTime + createdAt_lte: DateTime + createdAt_gt: DateTime + createdAt_gte: DateTime + updatedAt: DateTime + updatedAt_not: DateTime + updatedAt_in: [DateTime!] + updatedAt_not_in: [DateTime!] + updatedAt_lt: DateTime + updatedAt_lte: DateTime + updatedAt_gt: DateTime + updatedAt_gte: DateTime + AND: [ObjectiveLinkWhereInput!] + OR: [ObjectiveLinkWhereInput!] + NOT: [ObjectiveLinkWhereInput!] +} + +input ObjectiveLinkWhereUniqueInput { + id: ID +} + type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! @@ -4735,6 +5100,9 @@ type Query { goalLink(where: GoalLinkWhereUniqueInput!): GoalLink goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink]! goalLinksConnection(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): GoalLinkConnection! + objectiveLink(where: ObjectiveLinkWhereUniqueInput!): ObjectiveLink + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink]! + objectiveLinksConnection(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): ObjectiveLinkConnection! pointGroup(where: PointGroupWhereUniqueInput!): PointGroup pointGroups(where: PointGroupWhereInput, orderBy: PointGroupOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [PointGroup]! pointGroupsConnection(where: PointGroupWhereInput, orderBy: PointGroupOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): PointGroupConnection! @@ -4780,6 +5148,7 @@ type Subscription { course(where: CourseSubscriptionWhereInput): CourseSubscriptionPayload courseLink(where: CourseLinkSubscriptionWhereInput): CourseLinkSubscriptionPayload goalLink(where: GoalLinkSubscriptionWhereInput): GoalLinkSubscriptionPayload + objectiveLink(where: ObjectiveLinkSubscriptionWhereInput): ObjectiveLinkSubscriptionPayload pointGroup(where: PointGroupSubscriptionWhereInput): PointGroupSubscriptionPayload project(where: ProjectSubscriptionWhereInput): ProjectSubscriptionPayload projectParticipant(where: ProjectParticipantSubscriptionWhereInput): ProjectParticipantSubscriptionPayload @@ -5450,6 +5819,7 @@ type Workspace { courseLinks(where: CourseLinkWhereInput, orderBy: CourseLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [CourseLink!] goals(where: ConceptWhereInput, orderBy: ConceptOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Concept!] goalLinks(where: GoalLinkWhereInput, orderBy: GoalLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [GoalLink!] + objectiveLinks(where: ObjectiveLinkWhereInput, orderBy: ObjectiveLinkOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ObjectiveLink!] participants(where: WorkspaceParticipantWhereInput, orderBy: WorkspaceParticipantOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [WorkspaceParticipant!] tokens(where: WorkspaceTokenWhereInput, orderBy: WorkspaceTokenOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [WorkspaceToken!] mainCourse: Course @@ -5488,6 +5858,7 @@ input WorkspaceCreateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5553,6 +5924,11 @@ input WorkspaceCreateOneWithoutGoalLinksInput { connect: WorkspaceWhereUniqueInput } +input WorkspaceCreateOneWithoutObjectiveLinksInput { + create: WorkspaceCreateWithoutObjectiveLinksInput + connect: WorkspaceWhereUniqueInput +} + input WorkspaceCreateOneWithoutParticipantsInput { create: WorkspaceCreateWithoutParticipantsInput connect: WorkspaceWhereUniqueInput @@ -5583,6 +5959,7 @@ input WorkspaceCreateWithoutAsMergeInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5608,6 +5985,7 @@ input WorkspaceCreateWithoutAsTemplateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5633,6 +6011,7 @@ input WorkspaceCreateWithoutClonesInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5658,6 +6037,7 @@ input WorkspaceCreateWithoutConceptLinksInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5683,6 +6063,7 @@ input WorkspaceCreateWithoutConceptsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5708,6 +6089,7 @@ input WorkspaceCreateWithoutCourseLinksInput { conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5733,6 +6115,7 @@ input WorkspaceCreateWithoutCoursesInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5758,6 +6141,33 @@ input WorkspaceCreateWithoutGoalLinksInput { conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput + participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput + tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput + mainCourse: CourseCreateOneInput + pointGroups: PointGroupCreateManyWithoutWorkspaceInput + courseTags: TagCreateManyInput + conceptTags: TagCreateManyInput + goalTags: TagCreateManyInput + createdBy: UserCreateOneInput +} + +input WorkspaceCreateWithoutObjectiveLinksInput { + id: ID + name: String! + sourceProject: ProjectCreateOneWithoutWorkspacesInput + sourceTemplate: WorkspaceCreateOneWithoutClonesInput + asMerge: ProjectCreateOneWithoutMergesInput + asTemplate: ProjectCreateOneWithoutTemplatesInput + clones: WorkspaceCreateManyWithoutSourceTemplateInput + courses: CourseCreateManyWithoutWorkspaceInput + courseOrder: WorkspaceCreatecourseOrderInput + concepts: ConceptCreateManyWithoutWorkspaceInput + commonConcepts: ConceptCreateManyInput + conceptLinks: ConceptLinkCreateManyWithoutWorkspaceInput + courseLinks: CourseLinkCreateManyWithoutWorkspaceInput + goals: ConceptCreateManyInput + goalLinks: GoalLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5784,6 +6194,7 @@ input WorkspaceCreateWithoutParticipantsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput pointGroups: PointGroupCreateManyWithoutWorkspaceInput @@ -5809,6 +6220,7 @@ input WorkspaceCreateWithoutPointGroupsInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5833,6 +6245,7 @@ input WorkspaceCreateWithoutSourceProjectInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5858,6 +6271,7 @@ input WorkspaceCreateWithoutSourceTemplateInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput tokens: WorkspaceTokenCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput @@ -5884,6 +6298,7 @@ input WorkspaceCreateWithoutTokensInput { courseLinks: CourseLinkCreateManyWithoutWorkspaceInput goals: ConceptCreateManyInput goalLinks: GoalLinkCreateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkCreateManyWithoutWorkspaceInput participants: WorkspaceParticipantCreateManyWithoutWorkspaceInput mainCourse: CourseCreateOneInput pointGroups: PointGroupCreateManyWithoutWorkspaceInput @@ -6514,6 +6929,7 @@ input WorkspaceUpdateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6539,6 +6955,7 @@ input WorkspaceUpdateInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6656,6 +7073,13 @@ input WorkspaceUpdateOneRequiredWithoutGoalLinksInput { connect: WorkspaceWhereUniqueInput } +input WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput { + create: WorkspaceCreateWithoutObjectiveLinksInput + update: WorkspaceUpdateWithoutObjectiveLinksDataInput + upsert: WorkspaceUpsertWithoutObjectiveLinksInput + connect: WorkspaceWhereUniqueInput +} + input WorkspaceUpdateOneRequiredWithoutParticipantsInput { create: WorkspaceCreateWithoutParticipantsInput update: WorkspaceUpdateWithoutParticipantsDataInput @@ -6700,6 +7124,7 @@ input WorkspaceUpdateWithoutAsMergeDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6724,6 +7149,7 @@ input WorkspaceUpdateWithoutAsTemplateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6748,6 +7174,7 @@ input WorkspaceUpdateWithoutClonesDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6772,6 +7199,7 @@ input WorkspaceUpdateWithoutConceptLinksDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6796,6 +7224,7 @@ input WorkspaceUpdateWithoutConceptsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6820,6 +7249,7 @@ input WorkspaceUpdateWithoutCourseLinksDataInput { conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6844,6 +7274,7 @@ input WorkspaceUpdateWithoutCoursesDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6868,6 +7299,32 @@ input WorkspaceUpdateWithoutGoalLinksDataInput { conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput + participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput + tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput + mainCourse: CourseUpdateOneInput + pointGroups: PointGroupUpdateManyWithoutWorkspaceInput + courseTags: TagUpdateManyInput + conceptTags: TagUpdateManyInput + goalTags: TagUpdateManyInput + createdBy: UserUpdateOneInput +} + +input WorkspaceUpdateWithoutObjectiveLinksDataInput { + name: String + sourceProject: ProjectUpdateOneWithoutWorkspacesInput + sourceTemplate: WorkspaceUpdateOneWithoutClonesInput + asMerge: ProjectUpdateOneWithoutMergesInput + asTemplate: ProjectUpdateOneWithoutTemplatesInput + clones: WorkspaceUpdateManyWithoutSourceTemplateInput + courses: CourseUpdateManyWithoutWorkspaceInput + courseOrder: WorkspaceUpdatecourseOrderInput + concepts: ConceptUpdateManyWithoutWorkspaceInput + commonConcepts: ConceptUpdateManyInput + conceptLinks: ConceptLinkUpdateManyWithoutWorkspaceInput + courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput + goals: ConceptUpdateManyInput + goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6893,6 +7350,7 @@ input WorkspaceUpdateWithoutParticipantsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput pointGroups: PointGroupUpdateManyWithoutWorkspaceInput @@ -6917,6 +7375,7 @@ input WorkspaceUpdateWithoutPointGroupsDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6940,6 +7399,7 @@ input WorkspaceUpdateWithoutSourceProjectDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6964,6 +7424,7 @@ input WorkspaceUpdateWithoutSourceTemplateDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput tokens: WorkspaceTokenUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput @@ -6989,6 +7450,7 @@ input WorkspaceUpdateWithoutTokensDataInput { courseLinks: CourseLinkUpdateManyWithoutWorkspaceInput goals: ConceptUpdateManyInput goalLinks: GoalLinkUpdateManyWithoutWorkspaceInput + objectiveLinks: ObjectiveLinkUpdateManyWithoutWorkspaceInput participants: WorkspaceParticipantUpdateManyWithoutWorkspaceInput mainCourse: CourseUpdateOneInput pointGroups: PointGroupUpdateManyWithoutWorkspaceInput @@ -7053,6 +7515,11 @@ input WorkspaceUpsertWithoutGoalLinksInput { create: WorkspaceCreateWithoutGoalLinksInput! } +input WorkspaceUpsertWithoutObjectiveLinksInput { + update: WorkspaceUpdateWithoutObjectiveLinksDataInput! + create: WorkspaceCreateWithoutObjectiveLinksInput! +} + input WorkspaceUpsertWithoutParticipantsInput { update: WorkspaceUpdateWithoutParticipantsDataInput! create: WorkspaceCreateWithoutParticipantsInput! @@ -7149,6 +7616,9 @@ input WorkspaceWhereInput { goalLinks_every: GoalLinkWhereInput goalLinks_some: GoalLinkWhereInput goalLinks_none: GoalLinkWhereInput + objectiveLinks_every: ObjectiveLinkWhereInput + objectiveLinks_some: ObjectiveLinkWhereInput + objectiveLinks_none: ObjectiveLinkWhereInput participants_every: WorkspaceParticipantWhereInput participants_some: WorkspaceParticipantWhereInput participants_none: WorkspaceParticipantWhereInput diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index e77bed6b4..2fa80ca4e 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -359,6 +359,7 @@ type Workspace { courseLinks: [CourseLink!]! goals: [Concept!]! goalLinks: [GoalLink!]! + objectiveLinks: [ObjectiveLink!]! # Authorization data participants: [WorkspaceParticipant!]! @@ -482,6 +483,7 @@ type Course { # Goals goalLinks: [GoalLink!]! + objectiveLinks: [ObjectiveLink!]! } @@ -513,6 +515,18 @@ enum ConceptLevel { COMMON } +type ObjectiveLink { + id: ID! + course: Course! + goal: Concept! + workspace: Workspace! + text: String + + createdBy: User! + createdAt: DateTime! + updatedAt: DateTime! +} + type GoalLink { id: ID! course: Course! diff --git a/backend/schema/source/datamodel.prisma b/backend/schema/source/datamodel.prisma index d938f3739..e5048cde5 100644 --- a/backend/schema/source/datamodel.prisma +++ b/backend/schema/source/datamodel.prisma @@ -87,6 +87,7 @@ type Workspace { courseLinks: [CourseLink!]! @relation(name:"WorkspaceCourseLinks", onDelete: CASCADE) goals: [Concept!]! @relation(name: "WorkspaceGoals", onDelete: CASCADE) goalLinks: [GoalLink!]! @relation(name: "WorkspaceGoalLinks", onDelete: CASCADE) + objectiveLinks: [ObjectiveLink!]! @relation(name: "WorkspaceObjectiveLinks", onDelete: CASCADE) # Authorization data participants: [WorkspaceParticipant!]! @relation(name: "WorkspaceParticipantWorkspace", onDelete: CASCADE) @@ -210,6 +211,7 @@ type Course { # Goals goalLinks: [GoalLink!]! @relation(name: "GoalConceptsOfCourse", onDelete: CASCADE) + objectiveLinks: [ObjectiveLink!]! @relation(name: "ObjectiveLinksToCourse", onDelete: CASCADE) } @@ -241,6 +243,18 @@ enum ConceptLevel { COMMON } +type ObjectiveLink { + id: ID! @id + course: Course! @relation(name: "ObjectiveLinksToCourse") + goal: Concept! @relation(name: "ObjectiveLink") + workspace: Workspace! @relation(name: "WorkspaceObjectiveLinks") + text: String + + createdBy: User! + createdAt: DateTime! @createdAt + updatedAt: DateTime! @updatedAt +} + type GoalLink { id: ID! @id course: Course! @relation(name: "GoalConceptsOfCourse") From aafc0a371a8d9f5f01ca58a34cd65dca12fc5d06 Mon Sep 17 00:00:00 2001 From: d471061c Date: Wed, 19 Feb 2020 11:31:13 +0200 Subject: [PATCH 02/19] add type resolver for objective link --- backend/src/resolvers/Type/ObjectiveLink.js | 9 +++++++++ backend/src/resolvers/Type/index.js | 1 + 2 files changed, 10 insertions(+) create mode 100644 backend/src/resolvers/Type/ObjectiveLink.js diff --git a/backend/src/resolvers/Type/ObjectiveLink.js b/backend/src/resolvers/Type/ObjectiveLink.js new file mode 100644 index 000000000..8f098aac3 --- /dev/null +++ b/backend/src/resolvers/Type/ObjectiveLink.js @@ -0,0 +1,9 @@ +import makeTypeResolvers from './typeutil' + +export const ObjectiveLink = makeTypeResolvers('objectiveLink', [ + 'goal', + 'course', + 'workspace', + 'createdBy', + 'text' +]) diff --git a/backend/src/resolvers/Type/index.js b/backend/src/resolvers/Type/index.js index 2843f8432..a7fe899ba 100644 --- a/backend/src/resolvers/Type/index.js +++ b/backend/src/resolvers/Type/index.js @@ -12,3 +12,4 @@ export * from './ProjectParticipant' export * from './PointGroup' export * from './Completion' export * from './GoalLink' +export * from './ObjectiveLink' From 3742a0f384dde5bad3add2e2de3762bb2098e8f1 Mon Sep 17 00:00:00 2001 From: d471061c Date: Thu, 20 Feb 2020 09:43:50 +0200 Subject: [PATCH 03/19] add subscriptions for objective link --- backend/schema/generated/schema.graphql | 4 ++++ backend/schema/source/extra.prisma | 4 ++++ backend/src/resolvers/Subscription/channels.js | 3 +++ backend/src/resolvers/Subscription/index.js | 3 ++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index 2fa80ca4e..a54592f48 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -135,6 +135,10 @@ type Subscription { goalLinkCreated(workspaceId: ID!): GoalLink! goalLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + # ObjectiveLink subscriptions + objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! + objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + # Workspaces subscriptions projectWorkspaceCreated(projectId: ID!): Workspace! projectWorkspaceUpdated(projectId: ID!): WorkspaceUpdate! diff --git a/backend/schema/source/extra.prisma b/backend/schema/source/extra.prisma index d01c02416..527caa0e5 100644 --- a/backend/schema/source/extra.prisma +++ b/backend/schema/source/extra.prisma @@ -135,6 +135,10 @@ type Subscription { goalLinkCreated(workspaceId: ID!): GoalLink! goalLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + # ObjectiveLink subscriptions + objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! + objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + # Workspaces subscriptions projectWorkspaceCreated(projectId: ID!): Workspace! projectWorkspaceUpdated(projectId: ID!): WorkspaceUpdate! diff --git a/backend/src/resolvers/Subscription/channels.js b/backend/src/resolvers/Subscription/channels.js index a670f43f6..ca3c376f1 100644 --- a/backend/src/resolvers/Subscription/channels.js +++ b/backend/src/resolvers/Subscription/channels.js @@ -10,6 +10,9 @@ export const CONCEPT_LINK_DELETED = 'CONCEPT_LINK_DELETED' export const GOAL_LINK_CREATED = 'GOAL_LINK_CREATED' export const GOAL_LINK_DELETED = 'GOAL_LINK_DELETED' +export const OBJECTIVE_LINK_CREATED = 'OBJECTIVE_LINK_CREATED' +export const OBJECTIVE_LINK_DELETED = 'OBJECTIVE_LINK_DELETED' + export const COURSE_CREATED = 'COURSE_CREATED' export const COURSE_UPDATED = 'COURSE_UPDATED' export const COURSE_DELETED = 'COURSE_DELETED' diff --git a/backend/src/resolvers/Subscription/index.js b/backend/src/resolvers/Subscription/index.js index bf6d4d390..a419e9c02 100644 --- a/backend/src/resolvers/Subscription/index.js +++ b/backend/src/resolvers/Subscription/index.js @@ -13,5 +13,6 @@ export default { 'projectId', 'projectId', canViewProject), ...makeSubscriptionResolvers('project workspace', ['create', 'update', 'delete'], 'pId', 'projectId', canViewProject), - ...makeSubscriptionResolvers('goal link', ['create', 'delete']) + ...makeSubscriptionResolvers('goal link', ['create', 'delete']), + ...makeSubscriptionResolvers('objective link', ['create', 'delete']) } From d38997542c2a0419ab85034e2695852315ea5173 Mon Sep 17 00:00:00 2001 From: d471061c Date: Thu, 20 Feb 2020 10:18:54 +0200 Subject: [PATCH 04/19] add objective link creation and deletion mutation --- backend/schema/generated/schema.graphql | 4 ++ backend/schema/source/extra.prisma | 4 ++ .../src/resolvers/Mutation/ObjectiveLink.js | 53 +++++++++++++++++++ backend/src/resolvers/Mutation/index.js | 1 + 4 files changed, 62 insertions(+) create mode 100644 backend/src/resolvers/Mutation/ObjectiveLink.js diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index a54592f48..d5a3c5a31 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -69,6 +69,10 @@ type Mutation { createGoalLink(goalId: ID!, courseId: ID!, workspaceId: ID!, text: String): GoalLink! deleteGoalLink(id: ID!): DeletedGoalLinkItem! + # Objective link mutations + createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! + # Project mutations createProject(name: String!): Project! updateProject(id: ID!, name: String!): Project! diff --git a/backend/schema/source/extra.prisma b/backend/schema/source/extra.prisma index 527caa0e5..9e2cdec80 100644 --- a/backend/schema/source/extra.prisma +++ b/backend/schema/source/extra.prisma @@ -69,6 +69,10 @@ type Mutation { createGoalLink(goalId: ID!, courseId: ID!, workspaceId: ID!, text: String): GoalLink! deleteGoalLink(id: ID!): DeletedGoalLinkItem! + # Objective link mutations + createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! + # Project mutations createProject(name: String!): Project! updateProject(id: ID!, name: String!): Project! diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js new file mode 100644 index 000000000..74d838c1c --- /dev/null +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -0,0 +1,53 @@ +import { ForbiddenError } from 'apollo-server-core' +import { checkAccess, Role, Privilege } from '../../util/accessControl' +import pubsub from '../Subscription/pubsub' + +const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, text }, context) => { + await checkAccess(context, { + minimumRole: Role.STAFF, + minimumPrivilege: Privilege.EDIT, + workspaceId + }) + const objective = nullShield(await context.prisma.concept({ id: objectiveId })) + if (objective.level !== 'OBJECTIVE') { + throw new ForbiddenError("Can't create objective link to a non-objective concept") + } + + const createdLink = await context.prisma.createObjectiveLink({ + objective: { connect: { id: objectiveId }}, + course: { connect: { id: courseId }}, + workspace: { connect: { id: workspaceId }}, + createdBy: { connect: { id: context.user.id }}, + text + }) + + pubsub.publish(channels.OBJECTIVE_LINK_CREATED, { + objectiveLinkCreated: { ...createdLink } + }) + + return createdLink +} + +const deleteObjectiveLink = async(root, { id }, context) => { + const { id: workspaceId } = nullShield(await context.prisma.objectiveLink({ id }).workspace()) + await checkAccess(context, { + minimumRole: Role.STAFF, + minimumPrivilege: Privilege.EDIT, + workspaceId + }) + const { id: courseId } = await context.prisma.objectiveLink({ id }).course() + await context.prisma.deleteObjectiveLink({ id }) + const objectiveLinkDeleted = { id, workspaceId, courseId } + + pubsub.publish(channels.OBJECTIVE_LINK_DELETED, { + objectiveLinkDeleted + }) + + return objectiveLinkDeleted +} + + +export { + createObjectiveLink, + deleteObjectiveLink +} \ No newline at end of file diff --git a/backend/src/resolvers/Mutation/index.js b/backend/src/resolvers/Mutation/index.js index c74d5c88d..2963d6a35 100644 --- a/backend/src/resolvers/Mutation/index.js +++ b/backend/src/resolvers/Mutation/index.js @@ -12,3 +12,4 @@ export * from './Merge' export * from './PointGroup' export * from './User' export * from './GoalLink' +export * from './ObjectiveLink' \ No newline at end of file From 2b6be54f4a432c724f310e13ebdfbe7214ff9553 Mon Sep 17 00:00:00 2001 From: d471061c Date: Thu, 20 Feb 2020 10:27:03 +0200 Subject: [PATCH 05/19] add missing type resolver for workspace --- backend/src/resolvers/Type/Workspace.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/resolvers/Type/Workspace.js b/backend/src/resolvers/Type/Workspace.js index 291e7c255..ee2ee1612 100644 --- a/backend/src/resolvers/Type/Workspace.js +++ b/backend/src/resolvers/Type/Workspace.js @@ -18,6 +18,7 @@ export const Workspace = makeTypeResolvers('workspace', [ 'createdBy', 'goals', 'goalLinks', + 'objectiveLinks', 'goalTags', { name: 'pointGroups', From c2dad30aa3e04dbb7d85a6b0e1ad4df7717612ac Mon Sep 17 00:00:00 2001 From: d471061c Date: Thu, 20 Feb 2020 11:14:53 +0200 Subject: [PATCH 06/19] add objectivelink mutations --- .../schema/generated/prisma-client/index.d.ts | 20 +++++++++---------- .../generated/prisma-client/prisma-schema.js | 16 +++++++-------- .../generated/prisma-client/prisma.graphql | 16 +++++++-------- backend/schema/generated/schema.graphql | 2 +- backend/schema/source/datamodel.prisma | 2 +- .../src/resolvers/Mutation/ObjectiveLink.js | 2 ++ backend/src/resolvers/Type/ObjectiveLink.js | 2 +- 7 files changed, 31 insertions(+), 29 deletions(-) diff --git a/backend/schema/generated/prisma-client/index.d.ts b/backend/schema/generated/prisma-client/index.d.ts index 088fc1ac3..89c7ef415 100644 --- a/backend/schema/generated/prisma-client/index.d.ts +++ b/backend/schema/generated/prisma-client/index.d.ts @@ -1944,7 +1944,7 @@ export interface ObjectiveLinkWhereInput { id_ends_with?: Maybe; id_not_ends_with?: Maybe; course?: Maybe; - goal?: Maybe; + objective?: Maybe; workspace?: Maybe; text?: Maybe; text_not?: Maybe; @@ -3233,7 +3233,7 @@ export interface ObjectiveLinkCreateManyWithoutCourseInput { export interface ObjectiveLinkCreateWithoutCourseInput { id?: Maybe; - goal: ConceptCreateOneInput; + objective: ConceptCreateOneInput; workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; text?: Maybe; createdBy: UserCreateOneInput; @@ -3349,7 +3349,7 @@ export interface ObjectiveLinkCreateManyWithoutWorkspaceInput { export interface ObjectiveLinkCreateWithoutWorkspaceInput { id?: Maybe; course: CourseCreateOneWithoutObjectiveLinksInput; - goal: ConceptCreateOneInput; + objective: ConceptCreateOneInput; text?: Maybe; createdBy: UserCreateOneInput; } @@ -5730,7 +5730,7 @@ export interface ObjectiveLinkUpdateWithWhereUniqueWithoutCourseInput { } export interface ObjectiveLinkUpdateWithoutCourseDataInput { - goal?: Maybe; + objective?: Maybe; workspace?: Maybe; text?: Maybe; createdBy?: Maybe; @@ -5916,7 +5916,7 @@ export interface ObjectiveLinkUpdateWithWhereUniqueWithoutWorkspaceInput { export interface ObjectiveLinkUpdateWithoutWorkspaceDataInput { course?: Maybe; - goal?: Maybe; + objective?: Maybe; text?: Maybe; createdBy?: Maybe; } @@ -7680,7 +7680,7 @@ export interface GoalLinkUpdateManyMutationInput { export interface ObjectiveLinkCreateInput { id?: Maybe; course: CourseCreateOneWithoutObjectiveLinksInput; - goal: ConceptCreateOneInput; + objective: ConceptCreateOneInput; workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; text?: Maybe; createdBy: UserCreateOneInput; @@ -7688,7 +7688,7 @@ export interface ObjectiveLinkCreateInput { export interface ObjectiveLinkUpdateInput { course?: Maybe; - goal?: Maybe; + objective?: Maybe; workspace?: Maybe; text?: Maybe; createdBy?: Maybe; @@ -9812,7 +9812,7 @@ export interface ObjectiveLinkPromise Fragmentable { id: () => Promise; course: () => T; - goal: () => T; + objective: () => T; workspace: () => T; text: () => Promise; createdBy: () => T; @@ -9825,7 +9825,7 @@ export interface ObjectiveLinkSubscription Fragmentable { id: () => Promise>; course: () => T; - goal: () => T; + objective: () => T; workspace: () => T; text: () => Promise>; createdBy: () => T; @@ -9838,7 +9838,7 @@ export interface ObjectiveLinkNullablePromise Fragmentable { id: () => Promise; course: () => T; - goal: () => T; + objective: () => T; workspace: () => T; text: () => Promise; createdBy: () => T; diff --git a/backend/schema/generated/prisma-client/prisma-schema.js b/backend/schema/generated/prisma-client/prisma-schema.js index 840b103e6..d9dccc707 100644 --- a/backend/schema/generated/prisma-client/prisma-schema.js +++ b/backend/schema/generated/prisma-client/prisma-schema.js @@ -3540,7 +3540,7 @@ interface Node { type ObjectiveLink { id: ID! course: Course! - goal: Concept! + objective: Concept! workspace: Workspace! text: String createdBy: User! @@ -3557,7 +3557,7 @@ type ObjectiveLinkConnection { input ObjectiveLinkCreateInput { id: ID course: CourseCreateOneWithoutObjectiveLinksInput! - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String createdBy: UserCreateOneInput! @@ -3575,7 +3575,7 @@ input ObjectiveLinkCreateManyWithoutWorkspaceInput { input ObjectiveLinkCreateWithoutCourseInput { id: ID - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String createdBy: UserCreateOneInput! @@ -3584,7 +3584,7 @@ input ObjectiveLinkCreateWithoutCourseInput { input ObjectiveLinkCreateWithoutWorkspaceInput { id: ID course: CourseCreateOneWithoutObjectiveLinksInput! - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! text: String createdBy: UserCreateOneInput! } @@ -3682,7 +3682,7 @@ input ObjectiveLinkSubscriptionWhereInput { input ObjectiveLinkUpdateInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String createdBy: UserUpdateOneRequiredInput @@ -3726,7 +3726,7 @@ input ObjectiveLinkUpdateManyWithWhereNestedInput { } input ObjectiveLinkUpdateWithoutCourseDataInput { - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String createdBy: UserUpdateOneRequiredInput @@ -3734,7 +3734,7 @@ input ObjectiveLinkUpdateWithoutCourseDataInput { input ObjectiveLinkUpdateWithoutWorkspaceDataInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput text: String createdBy: UserUpdateOneRequiredInput } @@ -3777,7 +3777,7 @@ input ObjectiveLinkWhereInput { id_ends_with: ID id_not_ends_with: ID course: CourseWhereInput - goal: ConceptWhereInput + objective: ConceptWhereInput workspace: WorkspaceWhereInput text: String text_not: String diff --git a/backend/schema/generated/prisma-client/prisma.graphql b/backend/schema/generated/prisma-client/prisma.graphql index 426b74228..bb824f676 100644 --- a/backend/schema/generated/prisma-client/prisma.graphql +++ b/backend/schema/generated/prisma-client/prisma.graphql @@ -3535,7 +3535,7 @@ interface Node { type ObjectiveLink { id: ID! course: Course! - goal: Concept! + objective: Concept! workspace: Workspace! text: String createdBy: User! @@ -3552,7 +3552,7 @@ type ObjectiveLinkConnection { input ObjectiveLinkCreateInput { id: ID course: CourseCreateOneWithoutObjectiveLinksInput! - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String createdBy: UserCreateOneInput! @@ -3570,7 +3570,7 @@ input ObjectiveLinkCreateManyWithoutWorkspaceInput { input ObjectiveLinkCreateWithoutCourseInput { id: ID - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String createdBy: UserCreateOneInput! @@ -3579,7 +3579,7 @@ input ObjectiveLinkCreateWithoutCourseInput { input ObjectiveLinkCreateWithoutWorkspaceInput { id: ID course: CourseCreateOneWithoutObjectiveLinksInput! - goal: ConceptCreateOneInput! + objective: ConceptCreateOneInput! text: String createdBy: UserCreateOneInput! } @@ -3677,7 +3677,7 @@ input ObjectiveLinkSubscriptionWhereInput { input ObjectiveLinkUpdateInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String createdBy: UserUpdateOneRequiredInput @@ -3721,7 +3721,7 @@ input ObjectiveLinkUpdateManyWithWhereNestedInput { } input ObjectiveLinkUpdateWithoutCourseDataInput { - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String createdBy: UserUpdateOneRequiredInput @@ -3729,7 +3729,7 @@ input ObjectiveLinkUpdateWithoutCourseDataInput { input ObjectiveLinkUpdateWithoutWorkspaceDataInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput - goal: ConceptUpdateOneRequiredInput + objective: ConceptUpdateOneRequiredInput text: String createdBy: UserUpdateOneRequiredInput } @@ -3772,7 +3772,7 @@ input ObjectiveLinkWhereInput { id_ends_with: ID id_not_ends_with: ID course: CourseWhereInput - goal: ConceptWhereInput + objective: ConceptWhereInput workspace: WorkspaceWhereInput text: String text_not: String diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index d5a3c5a31..e83c59d62 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -526,7 +526,7 @@ enum ConceptLevel { type ObjectiveLink { id: ID! course: Course! - goal: Concept! + objective: Concept! workspace: Workspace! text: String diff --git a/backend/schema/source/datamodel.prisma b/backend/schema/source/datamodel.prisma index e5048cde5..f151ebf24 100644 --- a/backend/schema/source/datamodel.prisma +++ b/backend/schema/source/datamodel.prisma @@ -246,7 +246,7 @@ enum ConceptLevel { type ObjectiveLink { id: ID! @id course: Course! @relation(name: "ObjectiveLinksToCourse") - goal: Concept! @relation(name: "ObjectiveLink") + objective: Concept! @relation(name: "ObjectiveLink") workspace: Workspace! @relation(name: "WorkspaceObjectiveLinks") text: String diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js index 74d838c1c..7e0abd246 100644 --- a/backend/src/resolvers/Mutation/ObjectiveLink.js +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -1,6 +1,8 @@ import { ForbiddenError } from 'apollo-server-core' import { checkAccess, Role, Privilege } from '../../util/accessControl' import pubsub from '../Subscription/pubsub' +import { nullShield } from '../../util/errors' +import * as channels from '../Subscription/channels' const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, text }, context) => { await checkAccess(context, { diff --git a/backend/src/resolvers/Type/ObjectiveLink.js b/backend/src/resolvers/Type/ObjectiveLink.js index 8f098aac3..b906cfbeb 100644 --- a/backend/src/resolvers/Type/ObjectiveLink.js +++ b/backend/src/resolvers/Type/ObjectiveLink.js @@ -1,7 +1,7 @@ import makeTypeResolvers from './typeutil' export const ObjectiveLink = makeTypeResolvers('objectiveLink', [ - 'goal', + 'objective', 'course', 'workspace', 'createdBy', From 9fc68673d8f7075f6a8e55f6345ab96b799ed356 Mon Sep 17 00:00:00 2001 From: d471061c Date: Fri, 21 Feb 2020 12:37:28 +0200 Subject: [PATCH 07/19] add object link update mutation and subscription --- .../schema/generated/prisma-client/index.d.ts | 135 ++++++------------ .../generated/prisma-client/prisma-schema.js | 28 ++++ .../generated/prisma-client/prisma.graphql | 28 ++++ backend/schema/generated/schema.graphql | 3 + backend/schema/source/datamodel.prisma | 1 + backend/schema/source/extra.prisma | 2 + .../src/resolvers/Mutation/ObjectiveLink.js | 31 +++- .../src/resolvers/Subscription/channels.js | 1 + 8 files changed, 136 insertions(+), 93 deletions(-) diff --git a/backend/schema/generated/prisma-client/index.d.ts b/backend/schema/generated/prisma-client/index.d.ts index 00e5e145b..1eb376aab 100644 --- a/backend/schema/generated/prisma-client/index.d.ts +++ b/backend/schema/generated/prisma-client/index.d.ts @@ -934,6 +934,8 @@ export type ObjectiveLinkOrderByInput = | "id_DESC" | "text_ASC" | "text_DESC" + | "weight_ASC" + | "weight_DESC" | "createdAt_ASC" | "createdAt_DESC" | "updatedAt_ASC" @@ -1970,6 +1972,14 @@ export interface ObjectiveLinkWhereInput { text_not_starts_with?: Maybe; text_ends_with?: Maybe; text_not_ends_with?: Maybe; + weight?: Maybe; + weight_not?: Maybe; + weight_in?: Maybe; + weight_not_in?: Maybe; + weight_lt?: Maybe; + weight_lte?: Maybe; + weight_gt?: Maybe; + weight_gte?: Maybe; createdBy?: Maybe; createdAt?: Maybe; createdAt_not?: Maybe; @@ -3247,6 +3257,7 @@ export interface ObjectiveLinkCreateWithoutCourseInput { objective: ConceptCreateOneInput; workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; text?: Maybe; + weight?: Maybe; createdBy: UserCreateOneInput; } @@ -3362,6 +3373,7 @@ export interface ObjectiveLinkCreateWithoutWorkspaceInput { course: CourseCreateOneWithoutObjectiveLinksInput; objective: ConceptCreateOneInput; text?: Maybe; + weight?: Maybe; createdBy: UserCreateOneInput; } @@ -5705,98 +5717,7 @@ export interface ConceptUpdateManyDataInput { count?: Maybe; } -export interface CourseUpsertWithoutGoalLinksInput { - update: CourseUpdateWithoutGoalLinksDataInput; - create: CourseCreateWithoutGoalLinksInput; -} - -export interface ConceptUpdateOneRequiredInput { - create?: Maybe; - update?: Maybe; - upsert?: Maybe; - connect?: Maybe; -} - -export interface ConceptUpsertNestedInput { - update: ConceptUpdateDataInput; - create: ConceptCreateInput; -} - -export interface GoalLinkUpsertWithWhereUniqueWithoutWorkspaceInput { - where: GoalLinkWhereUniqueInput; - update: GoalLinkUpdateWithoutWorkspaceDataInput; - create: GoalLinkCreateWithoutWorkspaceInput; -} - -export interface GoalLinkScalarWhereInput { - id?: Maybe; - id_not?: Maybe; - id_in?: Maybe; - id_not_in?: Maybe; - id_lt?: Maybe; - id_lte?: Maybe; - id_gt?: Maybe; - id_gte?: Maybe; - id_contains?: Maybe; - id_not_contains?: Maybe; - id_starts_with?: Maybe; - id_not_starts_with?: Maybe; - id_ends_with?: Maybe; - id_not_ends_with?: Maybe; - weight?: Maybe; - weight_not?: Maybe; - weight_in?: Maybe; - weight_not_in?: Maybe; - weight_lt?: Maybe; - weight_lte?: Maybe; - weight_gt?: Maybe; - weight_gte?: Maybe; - text?: Maybe; - text_not?: Maybe; - text_in?: Maybe; - text_not_in?: Maybe; - text_lt?: Maybe; - text_lte?: Maybe; - text_gt?: Maybe; - text_gte?: Maybe; - text_contains?: Maybe; - text_not_contains?: Maybe; - text_starts_with?: Maybe; - text_not_starts_with?: Maybe; - text_ends_with?: Maybe; - text_not_ends_with?: Maybe; - createdAt?: Maybe; - createdAt_not?: Maybe; - createdAt_in?: Maybe; - createdAt_not_in?: Maybe; - createdAt_lt?: Maybe; - createdAt_lte?: Maybe; - createdAt_gt?: Maybe; - createdAt_gte?: Maybe; - updatedAt?: Maybe; - updatedAt_not?: Maybe; - updatedAt_in?: Maybe; - updatedAt_not_in?: Maybe; - updatedAt_lt?: Maybe; - updatedAt_lte?: Maybe; - updatedAt_gt?: Maybe; - updatedAt_gte?: Maybe; - AND?: Maybe; - OR?: Maybe; - NOT?: Maybe; -} - -export interface GoalLinkUpdateManyWithWhereNestedInput { - where: GoalLinkScalarWhereInput; - data: GoalLinkUpdateManyDataInput; -} - -export interface GoalLinkUpdateManyDataInput { - weight?: Maybe; - text?: Maybe; -} - -export interface WorkspaceParticipantUpdateManyWithoutWorkspaceInput { +export interface ObjectiveLinkUpdateManyWithoutCourseInput { create?: Maybe< | ObjectiveLinkCreateWithoutCourseInput[] | ObjectiveLinkCreateWithoutCourseInput @@ -5837,6 +5758,7 @@ export interface ObjectiveLinkUpdateWithoutCourseDataInput { objective?: Maybe; workspace?: Maybe; text?: Maybe; + weight?: Maybe; createdBy?: Maybe; } @@ -6022,6 +5944,7 @@ export interface ObjectiveLinkUpdateWithoutWorkspaceDataInput { course?: Maybe; objective?: Maybe; text?: Maybe; + weight?: Maybe; createdBy?: Maybe; } @@ -6662,6 +6585,14 @@ export interface GoalLinkScalarWhereInput { id_not_starts_with?: Maybe; id_ends_with?: Maybe; id_not_ends_with?: Maybe; + weight?: Maybe; + weight_not?: Maybe; + weight_in?: Maybe; + weight_not_in?: Maybe; + weight_lt?: Maybe; + weight_lte?: Maybe; + weight_gt?: Maybe; + weight_gte?: Maybe; text?: Maybe; text_not?: Maybe; text_in?: Maybe; @@ -6703,6 +6634,7 @@ export interface GoalLinkUpdateManyWithWhereNestedInput { } export interface GoalLinkUpdateManyDataInput { + weight?: Maybe; text?: Maybe; } @@ -6746,6 +6678,14 @@ export interface ObjectiveLinkScalarWhereInput { text_not_starts_with?: Maybe; text_ends_with?: Maybe; text_not_ends_with?: Maybe; + weight?: Maybe; + weight_not?: Maybe; + weight_in?: Maybe; + weight_not_in?: Maybe; + weight_lt?: Maybe; + weight_lte?: Maybe; + weight_gt?: Maybe; + weight_gte?: Maybe; createdAt?: Maybe; createdAt_not?: Maybe; createdAt_in?: Maybe; @@ -6774,6 +6714,7 @@ export interface ObjectiveLinkUpdateManyWithWhereNestedInput { export interface ObjectiveLinkUpdateManyDataInput { text?: Maybe; + weight?: Maybe; } export interface WorkspaceUpsertWithoutTokensInput { @@ -7791,6 +7732,7 @@ export interface ObjectiveLinkCreateInput { objective: ConceptCreateOneInput; workspace: WorkspaceCreateOneWithoutObjectiveLinksInput; text?: Maybe; + weight?: Maybe; createdBy: UserCreateOneInput; } @@ -7799,11 +7741,13 @@ export interface ObjectiveLinkUpdateInput { objective?: Maybe; workspace?: Maybe; text?: Maybe; + weight?: Maybe; createdBy?: Maybe; } export interface ObjectiveLinkUpdateManyMutationInput { text?: Maybe; + weight?: Maybe; } export interface PointGroupCreateInput { @@ -9915,6 +9859,7 @@ export interface GoalLinkNullablePromise export interface ObjectiveLink { id: ID_Output; text?: String; + weight: Int; createdAt: DateTimeOutput; updatedAt: DateTimeOutput; } @@ -9927,6 +9872,7 @@ export interface ObjectiveLinkPromise objective: () => T; workspace: () => T; text: () => Promise; + weight: () => Promise; createdBy: () => T; createdAt: () => Promise; updatedAt: () => Promise; @@ -9940,6 +9886,7 @@ export interface ObjectiveLinkSubscription objective: () => T; workspace: () => T; text: () => Promise>; + weight: () => Promise>; createdBy: () => T; createdAt: () => Promise>; updatedAt: () => Promise>; @@ -9953,6 +9900,7 @@ export interface ObjectiveLinkNullablePromise objective: () => T; workspace: () => T; text: () => Promise; + weight: () => Promise; createdBy: () => T; createdAt: () => Promise; updatedAt: () => Promise; @@ -11568,6 +11516,7 @@ export interface ObjectiveLinkSubscriptionPayloadSubscription export interface ObjectiveLinkPreviousValues { id: ID_Output; text?: String; + weight: Int; createdAt: DateTimeOutput; updatedAt: DateTimeOutput; } @@ -11577,6 +11526,7 @@ export interface ObjectiveLinkPreviousValuesPromise Fragmentable { id: () => Promise; text: () => Promise; + weight: () => Promise; createdAt: () => Promise; updatedAt: () => Promise; } @@ -11586,6 +11536,7 @@ export interface ObjectiveLinkPreviousValuesSubscription Fragmentable { id: () => Promise>; text: () => Promise>; + weight: () => Promise>; createdAt: () => Promise>; updatedAt: () => Promise>; } diff --git a/backend/schema/generated/prisma-client/prisma-schema.js b/backend/schema/generated/prisma-client/prisma-schema.js index 56c397e6c..4a03853d8 100644 --- a/backend/schema/generated/prisma-client/prisma-schema.js +++ b/backend/schema/generated/prisma-client/prisma-schema.js @@ -3571,6 +3571,7 @@ type ObjectiveLink { objective: Concept! workspace: Workspace! text: String + weight: Int! createdBy: User! createdAt: DateTime! updatedAt: DateTime! @@ -3588,6 +3589,7 @@ input ObjectiveLinkCreateInput { objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3606,6 +3608,7 @@ input ObjectiveLinkCreateWithoutCourseInput { objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3614,6 +3617,7 @@ input ObjectiveLinkCreateWithoutWorkspaceInput { course: CourseCreateOneWithoutObjectiveLinksInput! objective: ConceptCreateOneInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3627,6 +3631,8 @@ enum ObjectiveLinkOrderByInput { id_DESC text_ASC text_DESC + weight_ASC + weight_DESC createdAt_ASC createdAt_DESC updatedAt_ASC @@ -3636,6 +3642,7 @@ enum ObjectiveLinkOrderByInput { type ObjectiveLinkPreviousValues { id: ID! text: String + weight: Int! createdAt: DateTime! updatedAt: DateTime! } @@ -3669,6 +3676,14 @@ input ObjectiveLinkScalarWhereInput { text_not_starts_with: String text_ends_with: String text_not_ends_with: String + weight: Int + weight_not: Int + weight_in: [Int!] + weight_not_in: [Int!] + weight_lt: Int + weight_lte: Int + weight_gt: Int + weight_gte: Int createdAt: DateTime createdAt_not: DateTime createdAt_in: [DateTime!] @@ -3713,15 +3728,18 @@ input ObjectiveLinkUpdateInput { objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } input ObjectiveLinkUpdateManyDataInput { text: String + weight: Int } input ObjectiveLinkUpdateManyMutationInput { text: String + weight: Int } input ObjectiveLinkUpdateManyWithoutCourseInput { @@ -3757,6 +3775,7 @@ input ObjectiveLinkUpdateWithoutCourseDataInput { objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } @@ -3764,6 +3783,7 @@ input ObjectiveLinkUpdateWithoutWorkspaceDataInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput objective: ConceptUpdateOneRequiredInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } @@ -3821,6 +3841,14 @@ input ObjectiveLinkWhereInput { text_not_starts_with: String text_ends_with: String text_not_ends_with: String + weight: Int + weight_not: Int + weight_in: [Int!] + weight_not_in: [Int!] + weight_lt: Int + weight_lte: Int + weight_gt: Int + weight_gte: Int createdBy: UserWhereInput createdAt: DateTime createdAt_not: DateTime diff --git a/backend/schema/generated/prisma-client/prisma.graphql b/backend/schema/generated/prisma-client/prisma.graphql index b763bf7bd..7e6b190f0 100644 --- a/backend/schema/generated/prisma-client/prisma.graphql +++ b/backend/schema/generated/prisma-client/prisma.graphql @@ -3566,6 +3566,7 @@ type ObjectiveLink { objective: Concept! workspace: Workspace! text: String + weight: Int! createdBy: User! createdAt: DateTime! updatedAt: DateTime! @@ -3583,6 +3584,7 @@ input ObjectiveLinkCreateInput { objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3601,6 +3603,7 @@ input ObjectiveLinkCreateWithoutCourseInput { objective: ConceptCreateOneInput! workspace: WorkspaceCreateOneWithoutObjectiveLinksInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3609,6 +3612,7 @@ input ObjectiveLinkCreateWithoutWorkspaceInput { course: CourseCreateOneWithoutObjectiveLinksInput! objective: ConceptCreateOneInput! text: String + weight: Int createdBy: UserCreateOneInput! } @@ -3622,6 +3626,8 @@ enum ObjectiveLinkOrderByInput { id_DESC text_ASC text_DESC + weight_ASC + weight_DESC createdAt_ASC createdAt_DESC updatedAt_ASC @@ -3631,6 +3637,7 @@ enum ObjectiveLinkOrderByInput { type ObjectiveLinkPreviousValues { id: ID! text: String + weight: Int! createdAt: DateTime! updatedAt: DateTime! } @@ -3664,6 +3671,14 @@ input ObjectiveLinkScalarWhereInput { text_not_starts_with: String text_ends_with: String text_not_ends_with: String + weight: Int + weight_not: Int + weight_in: [Int!] + weight_not_in: [Int!] + weight_lt: Int + weight_lte: Int + weight_gt: Int + weight_gte: Int createdAt: DateTime createdAt_not: DateTime createdAt_in: [DateTime!] @@ -3708,15 +3723,18 @@ input ObjectiveLinkUpdateInput { objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } input ObjectiveLinkUpdateManyDataInput { text: String + weight: Int } input ObjectiveLinkUpdateManyMutationInput { text: String + weight: Int } input ObjectiveLinkUpdateManyWithoutCourseInput { @@ -3752,6 +3770,7 @@ input ObjectiveLinkUpdateWithoutCourseDataInput { objective: ConceptUpdateOneRequiredInput workspace: WorkspaceUpdateOneRequiredWithoutObjectiveLinksInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } @@ -3759,6 +3778,7 @@ input ObjectiveLinkUpdateWithoutWorkspaceDataInput { course: CourseUpdateOneRequiredWithoutObjectiveLinksInput objective: ConceptUpdateOneRequiredInput text: String + weight: Int createdBy: UserUpdateOneRequiredInput } @@ -3816,6 +3836,14 @@ input ObjectiveLinkWhereInput { text_not_starts_with: String text_ends_with: String text_not_ends_with: String + weight: Int + weight_not: Int + weight_in: [Int!] + weight_not_in: [Int!] + weight_lt: Int + weight_lte: Int + weight_gt: Int + weight_gte: Int createdBy: UserWhereInput createdAt: DateTime createdAt_not: DateTime diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index 8b82af53a..8b114f28f 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -71,6 +71,7 @@ type Mutation { # Objective link mutations createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + updateObjectiveLink(id: ID!, text: String, weight: Int): ObjectiveLink! deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! # Project mutations @@ -141,6 +142,7 @@ type Subscription { # ObjectiveLink subscriptions objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! + objectiveLinkUpdated(workspaceId: ID!): ObjectiveLink! objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! # Workspaces subscriptions @@ -529,6 +531,7 @@ type ObjectiveLink { objective: Concept! workspace: Workspace! text: String + weight: Int! createdBy: User! createdAt: DateTime! diff --git a/backend/schema/source/datamodel.prisma b/backend/schema/source/datamodel.prisma index e77303898..5039edc30 100644 --- a/backend/schema/source/datamodel.prisma +++ b/backend/schema/source/datamodel.prisma @@ -249,6 +249,7 @@ type ObjectiveLink { objective: Concept! @relation(name: "ObjectiveLink") workspace: Workspace! @relation(name: "WorkspaceObjectiveLinks") text: String + weight: Int! @default(value: 100) createdBy: User! createdAt: DateTime! @createdAt diff --git a/backend/schema/source/extra.prisma b/backend/schema/source/extra.prisma index a2013ba73..4954cc662 100644 --- a/backend/schema/source/extra.prisma +++ b/backend/schema/source/extra.prisma @@ -71,6 +71,7 @@ type Mutation { # Objective link mutations createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + updateObjectiveLink(id: ID!, text: String, weight: Int): ObjectiveLink! deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! # Project mutations @@ -141,6 +142,7 @@ type Subscription { # ObjectiveLink subscriptions objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! + objectiveLinkUpdated(workspaceId: ID!): ObjectiveLink! objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! # Workspaces subscriptions diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js index 7e0abd246..9af9d387a 100644 --- a/backend/src/resolvers/Mutation/ObjectiveLink.js +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -48,8 +48,37 @@ const deleteObjectiveLink = async(root, { id }, context) => { return objectiveLinkDeleted } +const updateObjectiveLink = async(root, { id, text, weight }, context) => { + const { id: workspaceId } = nullShield(await context.prisma.objectiveLink({ id }).workspace()) + await checkAccess(context, { + minimumRole: Role.STAFF, + minimumPrivilege: Privilege.EDIT, + workspaceId + }) + const objective = nullShield(await context.prisma.objectiveLink({ id })) + + if (text) { + objective.text = text + } + + if (weight) { + objective.weight = weight + } + + const objectiveLinkUpdated = await context.prisma.updateObjectiveLink({ + where: { id }, + data: objective + }) + + pubsub.publish(channels.OBJECTIVE_LINK_UPDATED, { + objectiveLinkUpdated + }) + + return objectiveLinkUpdated +} export { createObjectiveLink, - deleteObjectiveLink + deleteObjectiveLink, + updateObjectiveLink } \ No newline at end of file diff --git a/backend/src/resolvers/Subscription/channels.js b/backend/src/resolvers/Subscription/channels.js index ca3c376f1..e68db79a7 100644 --- a/backend/src/resolvers/Subscription/channels.js +++ b/backend/src/resolvers/Subscription/channels.js @@ -11,6 +11,7 @@ export const GOAL_LINK_CREATED = 'GOAL_LINK_CREATED' export const GOAL_LINK_DELETED = 'GOAL_LINK_DELETED' export const OBJECTIVE_LINK_CREATED = 'OBJECTIVE_LINK_CREATED' +export const OBJECTIVE_LINK_UPDATED = 'OBJECTIVE_LINK_UPDATED' export const OBJECTIVE_LINK_DELETED = 'OBJECTIVE_LINK_DELETED' export const COURSE_CREATED = 'COURSE_CREATED' From e746c80d9af2ff9a6e16b1f1295826b0fc7d905e Mon Sep 17 00:00:00 2001 From: d471061c Date: Fri, 21 Feb 2020 12:51:09 +0200 Subject: [PATCH 08/19] fix objective link update --- backend/src/resolvers/Mutation/ObjectiveLink.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js index 9af9d387a..fa0a869ef 100644 --- a/backend/src/resolvers/Mutation/ObjectiveLink.js +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -55,19 +55,19 @@ const updateObjectiveLink = async(root, { id, text, weight }, context) => { minimumPrivilege: Privilege.EDIT, workspaceId }) - const objective = nullShield(await context.prisma.objectiveLink({ id })) + const data = {} if (text) { - objective.text = text + data.text = text } if (weight) { - objective.weight = weight + data.weight = weight } const objectiveLinkUpdated = await context.prisma.updateObjectiveLink({ where: { id }, - data: objective + data }) pubsub.publish(channels.OBJECTIVE_LINK_UPDATED, { From deb9f12910acf56a06932889200839e8cace4607 Mon Sep 17 00:00:00 2001 From: d471061c Date: Fri, 21 Feb 2020 13:25:17 +0200 Subject: [PATCH 09/19] add objective link mutations to frontend --- .../src/graphql/Mutation/ObjectiveLink.js | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 frontend/src/graphql/Mutation/ObjectiveLink.js diff --git a/frontend/src/graphql/Mutation/ObjectiveLink.js b/frontend/src/graphql/Mutation/ObjectiveLink.js new file mode 100644 index 000000000..542f21a01 --- /dev/null +++ b/frontend/src/graphql/Mutation/ObjectiveLink.js @@ -0,0 +1,56 @@ +import gql from 'graphql-tag' + +const CREATE_OBJECTIVE_LINK = gql` +mutation createObjectiveLink($objectiveId: ID!, $courseId: ID!, $workspaceId: ID!) { + __typename + id + text + weight + course { + id + } + objective { + id + } + workspace { + id + } +} +` + +const DELETE_OBJECTIVE_LINK = gql` +mutation deleteObjectiveLink($id: ID!) { + deleteObjectiveLink(id: $id) { + __typename + id + workspaceId + courseId + } +} +` + +const UPDATE_OBJECTIVE_LINK = gql` +mutation updateObjectiveLink($id: ID!, text: String, weight: int) { + updateObjectiveLink(id: $id, text: $text, weight: $weight) { + __typename + id + text + weight + course { + id + } + objective { + id + } + workspace { + id + } + } +} +` + +export { + CREATE_OBJECTIVE_LINK, + DELETE_OBJECTIVE_LINK, + UPDATE_OBJECTIVE_LINK +} \ No newline at end of file From ae1022bbf2b59547acbb4abd1dd6ab94e16671b4 Mon Sep 17 00:00:00 2001 From: d471061c Date: Fri, 21 Feb 2020 13:29:16 +0200 Subject: [PATCH 10/19] query objectivelinks in workspace query --- frontend/src/graphql/Query/Workspace.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/graphql/Query/Workspace.js b/frontend/src/graphql/Query/Workspace.js index 693451238..3614192ad 100644 --- a/frontend/src/graphql/Query/Workspace.js +++ b/frontend/src/graphql/Query/Workspace.js @@ -77,6 +77,17 @@ query workspaceById($id: ID!) { id } } + objectiveLinks { + id + text + weight + course { + id + } + objective { + id + } + } goals { id name From 66425c8c4056bf3b18ce25965cf643f373298fb3 Mon Sep 17 00:00:00 2001 From: d471061c Date: Fri, 21 Feb 2020 14:24:34 +0200 Subject: [PATCH 11/19] add objective link subscription to frontend --- frontend/src/graphql/Mutation/index.js | 1 + .../src/graphql/Subscription/ObjectiveLink.js | 56 +++++++++++++++++++ frontend/src/graphql/Subscription/index.js | 1 + 3 files changed, 58 insertions(+) create mode 100644 frontend/src/graphql/Subscription/ObjectiveLink.js diff --git a/frontend/src/graphql/Mutation/index.js b/frontend/src/graphql/Mutation/index.js index d5ff73f65..ef4d0dcc8 100644 --- a/frontend/src/graphql/Mutation/index.js +++ b/frontend/src/graphql/Mutation/index.js @@ -11,3 +11,4 @@ export * from './Merge' export * from './PointGroup' export * from './User' export * from './GoalLink' +export * from './ObjectiveLink' diff --git a/frontend/src/graphql/Subscription/ObjectiveLink.js b/frontend/src/graphql/Subscription/ObjectiveLink.js new file mode 100644 index 000000000..9ea397230 --- /dev/null +++ b/frontend/src/graphql/Subscription/ObjectiveLink.js @@ -0,0 +1,56 @@ +import gql from 'graphql-tag' + +const OBJECTIVE_LINK_CREATED = gql` +subscription($workspaceId: ID!) { + objectiveLinkCreated(workspaceId: $workspaceId) { + __typename + id + text + course { + id + } + goal { + id + } + workspace { + id + } + } +} +` + +const OBJECTIVE_LINK_UPDATED = gql` +subscription($workspaceId: ID!) { + objectiveLinkUpdated(workspaceId: $workspaceId) { + __typename + id + text + course { + id + } + goal { + id + } + workspace { + id + } + } +} +` + +const OBJECTIVE_LINK_DELETED = gql` +subscription($workspaceId: ID!) { + objectiveLinkDeleted(workspaceId: $workspaceId) { + __typename + id + workspaceId + courseId + } +} +` + +export { + OBJECTIVE_LINK_CREATED, + OBJECTIVE_LINK_UPDATED, + OBJECTIVE_LINK_DELETED +} \ No newline at end of file diff --git a/frontend/src/graphql/Subscription/index.js b/frontend/src/graphql/Subscription/index.js index 98a8a4351..f9b5bd2b2 100644 --- a/frontend/src/graphql/Subscription/index.js +++ b/frontend/src/graphql/Subscription/index.js @@ -5,3 +5,4 @@ export * from './ConceptLink' export * from './Workspace' export * from './ProjectWorkspace' export * from './Member' +export * from './ObjectiveLink' \ No newline at end of file From 2800431076fc345a7f724551a8f1953a370c97ff Mon Sep 17 00:00:00 2001 From: d471061c Date: Mon, 24 Feb 2020 09:50:06 +0200 Subject: [PATCH 12/19] fix typo --- frontend/src/graphql/Mutation/ObjectiveLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/graphql/Mutation/ObjectiveLink.js b/frontend/src/graphql/Mutation/ObjectiveLink.js index 542f21a01..6a9503216 100644 --- a/frontend/src/graphql/Mutation/ObjectiveLink.js +++ b/frontend/src/graphql/Mutation/ObjectiveLink.js @@ -30,7 +30,7 @@ mutation deleteObjectiveLink($id: ID!) { ` const UPDATE_OBJECTIVE_LINK = gql` -mutation updateObjectiveLink($id: ID!, text: String, weight: int) { +mutation updateObjectiveLink($id: ID!, $text: String, $weight: int) { updateObjectiveLink(id: $id, text: $text, weight: $weight) { __typename id From 3030c043e6f400394744999d2dd114384f0209f8 Mon Sep 17 00:00:00 2001 From: d471061c Date: Mon, 24 Feb 2020 09:59:51 +0200 Subject: [PATCH 13/19] fix type resolver --- backend/src/resolvers/Type/ObjectiveLink.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/resolvers/Type/ObjectiveLink.js b/backend/src/resolvers/Type/ObjectiveLink.js index b906cfbeb..06c5fb947 100644 --- a/backend/src/resolvers/Type/ObjectiveLink.js +++ b/backend/src/resolvers/Type/ObjectiveLink.js @@ -4,6 +4,5 @@ export const ObjectiveLink = makeTypeResolvers('objectiveLink', [ 'objective', 'course', 'workspace', - 'createdBy', - 'text' + 'createdBy' ]) From a72e0c86e48b596d25ac8745e63b23be88edb112 Mon Sep 17 00:00:00 2001 From: d471061c Date: Mon, 24 Feb 2020 10:24:22 +0200 Subject: [PATCH 14/19] fix typo --- backend/src/resolvers/Type/GoalLink.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/resolvers/Type/GoalLink.js b/backend/src/resolvers/Type/GoalLink.js index b820c6370..e42183a98 100644 --- a/backend/src/resolvers/Type/GoalLink.js +++ b/backend/src/resolvers/Type/GoalLink.js @@ -4,6 +4,5 @@ export const GoalLink = makeTypeResolvers('goalLink', [ 'goal', 'course', 'workspace', - 'createdBy', - 'text' + 'createdBy' ]) From 7f0b7958e2cffccae330f2d121f6f9e2f64673c7 Mon Sep 17 00:00:00 2001 From: d471061c Date: Mon, 24 Feb 2020 11:46:25 +0200 Subject: [PATCH 15/19] add fixes --- backend/schema/generated/schema.graphql | 10 ++++++++-- backend/schema/source/extra.prisma | 10 ++++++++-- backend/src/resolvers/Mutation/ObjectiveLink.js | 5 +++-- frontend/src/graphql/Mutation/ObjectiveLink.js | 4 +++- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/backend/schema/generated/schema.graphql b/backend/schema/generated/schema.graphql index 8b114f28f..f4f18b17f 100644 --- a/backend/schema/generated/schema.graphql +++ b/backend/schema/generated/schema.graphql @@ -70,7 +70,7 @@ type Mutation { deleteGoalLink(id: ID!): DeletedGoalLinkItem! # Objective link mutations - createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String, weight: Int): ObjectiveLink! updateObjectiveLink(id: ID!, text: String, weight: Int): ObjectiveLink! deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! @@ -143,7 +143,7 @@ type Subscription { # ObjectiveLink subscriptions objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! objectiveLinkUpdated(workspaceId: ID!): ObjectiveLink! - objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + objectiveLinkDeleted(workspaceId: ID!): DeletedObjectiveLinkItem! # Workspaces subscriptions projectWorkspaceCreated(projectId: ID!): Workspace! @@ -229,6 +229,12 @@ type DeletedGoalLinkItem { courseId: ID! } +type DeletedObjectiveLinkItem { + id: ID! + workspaceId: ID! + courseId: ID! +} + type DeletedConceptLink { id: ID! courseId: ID! diff --git a/backend/schema/source/extra.prisma b/backend/schema/source/extra.prisma index 4954cc662..6aa144ed1 100644 --- a/backend/schema/source/extra.prisma +++ b/backend/schema/source/extra.prisma @@ -70,7 +70,7 @@ type Mutation { deleteGoalLink(id: ID!): DeletedGoalLinkItem! # Objective link mutations - createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String): ObjectiveLink! + createObjectiveLink(objectiveId: ID!, courseId: ID!, workspaceId: ID!, text: String, weight: Int): ObjectiveLink! updateObjectiveLink(id: ID!, text: String, weight: Int): ObjectiveLink! deleteObjectiveLink(id: ID!): DeletedGoalLinkItem! @@ -143,7 +143,7 @@ type Subscription { # ObjectiveLink subscriptions objectiveLinkCreated(workspaceId: ID!): ObjectiveLink! objectiveLinkUpdated(workspaceId: ID!): ObjectiveLink! - objectiveLinkDeleted(workspaceId: ID!): DeletedGoalLinkItem! + objectiveLinkDeleted(workspaceId: ID!): DeletedObjectiveLinkItem! # Workspaces subscriptions projectWorkspaceCreated(projectId: ID!): Workspace! @@ -229,6 +229,12 @@ type DeletedGoalLinkItem { courseId: ID! } +type DeletedObjectiveLinkItem { + id: ID! + workspaceId: ID! + courseId: ID! +} + type DeletedConceptLink { id: ID! courseId: ID! diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js index fa0a869ef..b4ea249c0 100644 --- a/backend/src/resolvers/Mutation/ObjectiveLink.js +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -4,7 +4,7 @@ import pubsub from '../Subscription/pubsub' import { nullShield } from '../../util/errors' import * as channels from '../Subscription/channels' -const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, text }, context) => { +const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, text, weight }, context) => { await checkAccess(context, { minimumRole: Role.STAFF, minimumPrivilege: Privilege.EDIT, @@ -20,7 +20,8 @@ const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, te course: { connect: { id: courseId }}, workspace: { connect: { id: workspaceId }}, createdBy: { connect: { id: context.user.id }}, - text + text, + weight }) pubsub.publish(channels.OBJECTIVE_LINK_CREATED, { diff --git a/frontend/src/graphql/Mutation/ObjectiveLink.js b/frontend/src/graphql/Mutation/ObjectiveLink.js index 6a9503216..ba10fbf7a 100644 --- a/frontend/src/graphql/Mutation/ObjectiveLink.js +++ b/frontend/src/graphql/Mutation/ObjectiveLink.js @@ -1,7 +1,8 @@ import gql from 'graphql-tag' const CREATE_OBJECTIVE_LINK = gql` -mutation createObjectiveLink($objectiveId: ID!, $courseId: ID!, $workspaceId: ID!) { +mutation createObjectiveLink($objectiveId: ID!, $courseId: ID!, $workspaceId: ID!, text: String, weight: Int) { + createObjectiveLink(objectiveId: $objectiveId, courseId: $courseId, workspaceId: $workspaceId, text: $text, weight: $weight) { __typename id text @@ -15,6 +16,7 @@ mutation createObjectiveLink($objectiveId: ID!, $courseId: ID!, $workspaceId: ID workspace { id } + } } ` From 49274fe136c6a58abcee85954af6385726e2bb6c Mon Sep 17 00:00:00 2001 From: d471061c Date: Mon, 24 Feb 2020 11:56:51 +0200 Subject: [PATCH 16/19] apply eslint fixes --- frontend/src/components/WorkspaceNavBar.js | 2 +- frontend/src/graphql/Mutation/ObjectiveLink.js | 18 +++++++++++++++--- .../src/graphql/Subscription/ObjectiveLink.js | 2 +- frontend/src/graphql/Subscription/index.js | 2 +- frontend/src/views/coursemapper/MapperLinks.js | 11 +++++++---- frontend/src/views/goals/GoalView.js | 16 +++++++++++++--- 6 files changed, 38 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/WorkspaceNavBar.js b/frontend/src/components/WorkspaceNavBar.js index 060dfc219..0d6a88965 100644 --- a/frontend/src/components/WorkspaceNavBar.js +++ b/frontend/src/components/WorkspaceNavBar.js @@ -189,7 +189,7 @@ const WorkspaceNavBar = ({ page, workspaceId, courseId, urlPrefix }) => { Export - { isOwner && + { isOwner && diff --git a/frontend/src/graphql/Mutation/ObjectiveLink.js b/frontend/src/graphql/Mutation/ObjectiveLink.js index ba10fbf7a..098d166a6 100644 --- a/frontend/src/graphql/Mutation/ObjectiveLink.js +++ b/frontend/src/graphql/Mutation/ObjectiveLink.js @@ -1,8 +1,20 @@ import gql from 'graphql-tag' const CREATE_OBJECTIVE_LINK = gql` -mutation createObjectiveLink($objectiveId: ID!, $courseId: ID!, $workspaceId: ID!, text: String, weight: Int) { - createObjectiveLink(objectiveId: $objectiveId, courseId: $courseId, workspaceId: $workspaceId, text: $text, weight: $weight) { +mutation createObjectiveLink( + $objectiveId: ID!, + $courseId: ID!, + $workspaceId: ID!, + text: String, + weight: Int +) { + createObjectiveLink( + objectiveId: $objectiveId, + courseId: $courseId, + workspaceId: $workspaceId, + text: $text, + weight: $weight + ) { __typename id text @@ -55,4 +67,4 @@ export { CREATE_OBJECTIVE_LINK, DELETE_OBJECTIVE_LINK, UPDATE_OBJECTIVE_LINK -} \ No newline at end of file +} diff --git a/frontend/src/graphql/Subscription/ObjectiveLink.js b/frontend/src/graphql/Subscription/ObjectiveLink.js index 9ea397230..141eb63a0 100644 --- a/frontend/src/graphql/Subscription/ObjectiveLink.js +++ b/frontend/src/graphql/Subscription/ObjectiveLink.js @@ -53,4 +53,4 @@ export { OBJECTIVE_LINK_CREATED, OBJECTIVE_LINK_UPDATED, OBJECTIVE_LINK_DELETED -} \ No newline at end of file +} diff --git a/frontend/src/graphql/Subscription/index.js b/frontend/src/graphql/Subscription/index.js index f9b5bd2b2..7185483c9 100644 --- a/frontend/src/graphql/Subscription/index.js +++ b/frontend/src/graphql/Subscription/index.js @@ -5,4 +5,4 @@ export * from './ConceptLink' export * from './Workspace' export * from './ProjectWorkspace' export * from './Member' -export * from './ObjectiveLink' \ No newline at end of file +export * from './ObjectiveLink' diff --git a/frontend/src/views/coursemapper/MapperLinks.js b/frontend/src/views/coursemapper/MapperLinks.js index 013ce72dc..eba0abd5a 100644 --- a/frontend/src/views/coursemapper/MapperLinks.js +++ b/frontend/src/views/coursemapper/MapperLinks.js @@ -1,5 +1,5 @@ import React, { useRef, useState } from 'react' -import { useMutation, useQuery } from 'react-apollo-hooks' +import { useQuery } from 'react-apollo-hooks' import { IconButton, makeStyles, Menu, MenuItem } from '@material-ui/core' import { Star as StarIcon, StarBorder as StarBorderIcon, StarHalf as StarHalfIcon @@ -7,7 +7,6 @@ import { import { ConceptLink } from './concept' import { LINKS_IN_COURSE } from '../../graphql/Query' -import { UPDATE_CONCEPT_LINK } from '../../graphql/Mutation' const useStyles = makeStyles({ root: { @@ -116,8 +115,12 @@ const MapperLinks = ({ {addingLink && { return (
setAddingLink(null)}>

Goal Mapping

- -
- + +
+
{goalLinks.map(link => Date: Mon, 24 Feb 2020 12:45:39 +0200 Subject: [PATCH 17/19] Fix eslint problems --- backend/src/resolvers/Mutation/ObjectiveLink.js | 15 ++++++++------- backend/src/resolvers/Mutation/index.js | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/backend/src/resolvers/Mutation/ObjectiveLink.js b/backend/src/resolvers/Mutation/ObjectiveLink.js index b4ea249c0..62203eb6c 100644 --- a/backend/src/resolvers/Mutation/ObjectiveLink.js +++ b/backend/src/resolvers/Mutation/ObjectiveLink.js @@ -1,4 +1,5 @@ import { ForbiddenError } from 'apollo-server-core' + import { checkAccess, Role, Privilege } from '../../util/accessControl' import pubsub from '../Subscription/pubsub' import { nullShield } from '../../util/errors' @@ -16,11 +17,11 @@ const createObjectiveLink = async(root, { objectiveId, courseId, workspaceId, te } const createdLink = await context.prisma.createObjectiveLink({ - objective: { connect: { id: objectiveId }}, - course: { connect: { id: courseId }}, - workspace: { connect: { id: workspaceId }}, - createdBy: { connect: { id: context.user.id }}, - text, + objective: { connect: { id: objectiveId } }, + course: { connect: { id: courseId } }, + workspace: { connect: { id: workspaceId } }, + createdBy: { connect: { id: context.user.id } }, + text, weight }) @@ -41,7 +42,7 @@ const deleteObjectiveLink = async(root, { id }, context) => { const { id: courseId } = await context.prisma.objectiveLink({ id }).course() await context.prisma.deleteObjectiveLink({ id }) const objectiveLinkDeleted = { id, workspaceId, courseId } - + pubsub.publish(channels.OBJECTIVE_LINK_DELETED, { objectiveLinkDeleted }) @@ -82,4 +83,4 @@ export { createObjectiveLink, deleteObjectiveLink, updateObjectiveLink -} \ No newline at end of file +} diff --git a/backend/src/resolvers/Mutation/index.js b/backend/src/resolvers/Mutation/index.js index 2963d6a35..034a39584 100644 --- a/backend/src/resolvers/Mutation/index.js +++ b/backend/src/resolvers/Mutation/index.js @@ -12,4 +12,4 @@ export * from './Merge' export * from './PointGroup' export * from './User' export * from './GoalLink' -export * from './ObjectiveLink' \ No newline at end of file +export * from './ObjectiveLink' From ac14e1c8f9e8ebc4eacee342c42da7be3cd5b45c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 24 Feb 2020 13:52:08 +0200 Subject: [PATCH 18/19] Fix typo --- frontend/src/graphql/Mutation/ObjectiveLink.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/graphql/Mutation/ObjectiveLink.js b/frontend/src/graphql/Mutation/ObjectiveLink.js index 098d166a6..e692060a6 100644 --- a/frontend/src/graphql/Mutation/ObjectiveLink.js +++ b/frontend/src/graphql/Mutation/ObjectiveLink.js @@ -5,8 +5,8 @@ mutation createObjectiveLink( $objectiveId: ID!, $courseId: ID!, $workspaceId: ID!, - text: String, - weight: Int + $text: String, + $weight: Int ) { createObjectiveLink( objectiveId: $objectiveId, From 5dad0d7bedbd55063ebf4a423da20f1ab11957be Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 25 Feb 2020 09:46:12 +0200 Subject: [PATCH 19/19] Update prisma version header --- backend/schema/generated/prisma-client/index.d.ts | 2 +- backend/schema/generated/prisma-client/prisma-schema.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/schema/generated/prisma-client/index.d.ts b/backend/schema/generated/prisma-client/index.d.ts index 1eb376aab..4baacdd22 100644 --- a/backend/schema/generated/prisma-client/index.d.ts +++ b/backend/schema/generated/prisma-client/index.d.ts @@ -1,4 +1,4 @@ -// Code generated by Prisma (prisma@1.34.8). DO NOT EDIT. +// Code generated by Prisma (prisma@1.34.10). DO NOT EDIT. // Please don't change this file manually but run `prisma generate` to update it. // For more information, please read the docs: https://www.prisma.io/docs/prisma-client/ diff --git a/backend/schema/generated/prisma-client/prisma-schema.js b/backend/schema/generated/prisma-client/prisma-schema.js index 4a03853d8..53bcc67e0 100644 --- a/backend/schema/generated/prisma-client/prisma-schema.js +++ b/backend/schema/generated/prisma-client/prisma-schema.js @@ -1,5 +1,5 @@ module.exports = { - typeDefs: // Code generated by Prisma (prisma@1.34.8). DO NOT EDIT. + typeDefs: // Code generated by Prisma (prisma@1.34.10). DO NOT EDIT. // Please don't change this file manually but run `prisma generate` to update it. // For more information, please read the docs: https://www.prisma.io/docs/prisma-client/