From 1e5a8ec8c430d93fe99120e93dceac5bba04c78c Mon Sep 17 00:00:00 2001 From: Stephan Kulla Date: Thu, 23 Nov 2023 11:03:01 +0100 Subject: [PATCH] refactor!: Remove some edges fields --- .../server/src/schema/thread/types.graphql | 6 -- .../schema/uuid/abstract-uuid/types.graphql | 6 -- .../src/schema/uuid/applet/types.graphql | 6 -- .../src/schema/uuid/article/types.graphql | 6 -- .../src/schema/uuid/course-page/types.graphql | 6 -- .../src/schema/uuid/course/types.graphql | 6 -- packages/server/src/types.ts | 102 ------------------ packages/types/src/index.ts | 42 -------- 8 files changed, 180 deletions(-) diff --git a/packages/server/src/schema/thread/types.graphql b/packages/server/src/schema/thread/types.graphql index 28cc67243..65342c1bf 100644 --- a/packages/server/src/schema/thread/types.graphql +++ b/packages/server/src/schema/thread/types.graphql @@ -68,17 +68,11 @@ type ThreadsCursor { } type CommentConnection { - edges: [CommentEdge!]! nodes: [Comment!]! totalCount: Int! pageInfo: PageInfo! } -type CommentEdge { - cursor: String! - node: Comment! -} - extend type Query { thread: ThreadQuery! } diff --git a/packages/server/src/schema/uuid/abstract-uuid/types.graphql b/packages/server/src/schema/uuid/abstract-uuid/types.graphql index b389d695e..237391513 100644 --- a/packages/server/src/schema/uuid/abstract-uuid/types.graphql +++ b/packages/server/src/schema/uuid/abstract-uuid/types.graphql @@ -14,17 +14,11 @@ interface AbstractUuid { } type AbstractUuidConnection { - edges: [AbstractUuidCursor!]! nodes: [AbstractUuid!]! totalCount: Int! pageInfo: PageInfo! } -type AbstractUuidCursor { - cursor: String! - node: AbstractUuid! -} - type Query { uuid(alias: AliasInput, id: Int): AbstractUuid } diff --git a/packages/server/src/schema/uuid/applet/types.graphql b/packages/server/src/schema/uuid/applet/types.graphql index 26344e192..229e38b36 100644 --- a/packages/server/src/schema/uuid/applet/types.graphql +++ b/packages/server/src/schema/uuid/applet/types.graphql @@ -71,13 +71,7 @@ type AppletRevision implements AbstractUuid & AbstractRevision & AbstractEntityR } type AppletRevisionConnection { - edges: [AppletRevisionCursor!]! nodes: [AppletRevision!]! totalCount: Int! pageInfo: PageInfo! } - -type AppletRevisionCursor { - cursor: String! - node: AppletRevision! -} diff --git a/packages/server/src/schema/uuid/article/types.graphql b/packages/server/src/schema/uuid/article/types.graphql index a7f978947..93be8c194 100644 --- a/packages/server/src/schema/uuid/article/types.graphql +++ b/packages/server/src/schema/uuid/article/types.graphql @@ -70,13 +70,7 @@ type ArticleRevision implements AbstractUuid & AbstractRevision & AbstractEntity } type ArticleRevisionConnection { - edges: [ArticleRevisionCursor!]! nodes: [ArticleRevision!]! totalCount: Int! pageInfo: PageInfo! } - -type ArticleRevisionCursor { - cursor: String! - node: ArticleRevision! -} diff --git a/packages/server/src/schema/uuid/course-page/types.graphql b/packages/server/src/schema/uuid/course-page/types.graphql index 759b852cc..cbdadcab5 100644 --- a/packages/server/src/schema/uuid/course-page/types.graphql +++ b/packages/server/src/schema/uuid/course-page/types.graphql @@ -63,13 +63,7 @@ type CoursePageRevision implements AbstractUuid & AbstractRevision & AbstractEnt } type CoursePageRevisionConnection { - edges: [CoursePageRevisionCursor!]! nodes: [CoursePageRevision!]! totalCount: Int! pageInfo: PageInfo! } - -type CoursePageRevisionCursor { - cursor: String! - node: CoursePageRevision! -} diff --git a/packages/server/src/schema/uuid/course/types.graphql b/packages/server/src/schema/uuid/course/types.graphql index b8eacb9b6..4d5f852ed 100644 --- a/packages/server/src/schema/uuid/course/types.graphql +++ b/packages/server/src/schema/uuid/course/types.graphql @@ -70,13 +70,7 @@ type CourseRevision implements AbstractUuid & AbstractRevision & AbstractEntityR } type CourseRevisionConnection { - edges: [CourseRevisionCursor!]! nodes: [CourseRevision!]! totalCount: Int! pageInfo: PageInfo! } - -type CourseRevisionCursor { - cursor: String! - node: CourseRevision! -} diff --git a/packages/server/src/types.ts b/packages/server/src/types.ts index 8bd405e8c..5096b5047 100644 --- a/packages/server/src/types.ts +++ b/packages/server/src/types.ts @@ -257,18 +257,11 @@ export type AbstractUuidEventsArgs = { export type AbstractUuidConnection = { __typename?: 'AbstractUuidConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type AbstractUuidCursor = { - __typename?: 'AbstractUuidCursor'; - cursor: Scalars['String']['output']; - node: Applet | AppletRevision | Article | ArticleRevision | Comment | Course | CoursePage | CoursePageRevision | CourseRevision | Event | EventRevision | Exercise | ExerciseGroup | ExerciseGroupRevision | ExerciseRevision | GroupedExercise | GroupedExerciseRevision | Page | PageRevision | TaxonomyTerm | User | Video | VideoRevision; -}; - export type AddRevisionResponse = { __typename?: 'AddRevisionResponse'; query: Query; @@ -393,18 +386,11 @@ export type AppletRevisionThreadsArgs = { export type AppletRevisionConnection = { __typename?: 'AppletRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type AppletRevisionCursor = { - __typename?: 'AppletRevisionCursor'; - cursor: Scalars['String']['output']; - node: AppletRevision; -}; - export type Article = AbstractEntity & AbstractRepository & AbstractTaxonomyTermChild & AbstractUuid & InstanceAware & ThreadAware & { __typename?: 'Article'; alias: Scalars['String']['output']; @@ -498,18 +484,11 @@ export type ArticleRevisionThreadsArgs = { export type ArticleRevisionConnection = { __typename?: 'ArticleRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type ArticleRevisionCursor = { - __typename?: 'ArticleRevisionCursor'; - cursor: Scalars['String']['output']; - node: ArticleRevision; -}; - export type CacheRemoveInput = { keys: Array; }; @@ -589,18 +568,11 @@ export type CommentEventsArgs = { export type CommentConnection = { __typename?: 'CommentConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CommentEdge = { - __typename?: 'CommentEdge'; - cursor: Scalars['String']['output']; - node: Comment; -}; - export enum CommentStatus { Done = 'done', NoStatus = 'noStatus', @@ -751,18 +723,11 @@ export type CoursePageRevisionThreadsArgs = { export type CoursePageRevisionConnection = { __typename?: 'CoursePageRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CoursePageRevisionCursor = { - __typename?: 'CoursePageRevisionCursor'; - cursor: Scalars['String']['output']; - node: CoursePageRevision; -}; - export type CourseRevision = AbstractEntityRevision & AbstractRevision & AbstractUuid & ThreadAware & { __typename?: 'CourseRevision'; alias: Scalars['String']['output']; @@ -801,18 +766,11 @@ export type CourseRevisionThreadsArgs = { export type CourseRevisionConnection = { __typename?: 'CourseRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CourseRevisionCursor = { - __typename?: 'CourseRevisionCursor'; - cursor: Scalars['String']['output']; - node: CourseRevision; -}; - export type CreateCommentNotificationEvent = AbstractNotificationEvent & InstanceAware & { __typename?: 'CreateCommentNotificationEvent'; actor: User; @@ -2952,7 +2910,6 @@ export type ResolversTypes = { AbstractTaxonomyTermChild: ResolverTypeWrapper['AbstractTaxonomyTermChild']>; AbstractUuid: ResolverTypeWrapper['AbstractUuid']>; AbstractUuidConnection: ResolverTypeWrapper>; - AbstractUuidCursor: ResolverTypeWrapper>; AddRevisionResponse: ResolverTypeWrapper>; AiQuery: ResolverTypeWrapper>; AliasInput: ResolverTypeWrapper>; @@ -2960,11 +2917,9 @@ export type ResolversTypes = { Applet: ResolverTypeWrapper>; AppletRevision: ResolverTypeWrapper>; AppletRevisionConnection: ResolverTypeWrapper>; - AppletRevisionCursor: ResolverTypeWrapper>; Article: ResolverTypeWrapper>; ArticleRevision: ResolverTypeWrapper>; ArticleRevisionConnection: ResolverTypeWrapper>; - ArticleRevisionCursor: ResolverTypeWrapper>; Boolean: ResolverTypeWrapper>; CacheRemoveInput: ResolverTypeWrapper>; CacheRemoveResponse: ResolverTypeWrapper>; @@ -2977,16 +2932,13 @@ export type ResolversTypes = { CheckoutRevisionResponse: ResolverTypeWrapper>; Comment: ResolverTypeWrapper>; CommentConnection: ResolverTypeWrapper>; - CommentEdge: ResolverTypeWrapper>; CommentStatus: ResolverTypeWrapper>; Course: ResolverTypeWrapper>; CoursePage: ResolverTypeWrapper>; CoursePageRevision: ResolverTypeWrapper>; CoursePageRevisionConnection: ResolverTypeWrapper>; - CoursePageRevisionCursor: ResolverTypeWrapper>; CourseRevision: ResolverTypeWrapper>; CourseRevisionConnection: ResolverTypeWrapper>; - CourseRevisionCursor: ResolverTypeWrapper>; CreateCommentNotificationEvent: ResolverTypeWrapper>; CreateEntityLinkNotificationEvent: ResolverTypeWrapper>; CreateEntityNotificationEvent: ResolverTypeWrapper>; @@ -3163,7 +3115,6 @@ export type ResolversParentTypes = { AbstractTaxonomyTermChild: ResolversInterfaceTypes['AbstractTaxonomyTermChild']; AbstractUuid: ResolversInterfaceTypes['AbstractUuid']; AbstractUuidConnection: ModelOf; - AbstractUuidCursor: ModelOf; AddRevisionResponse: ModelOf; AiQuery: ModelOf; AliasInput: ModelOf; @@ -3171,11 +3122,9 @@ export type ResolversParentTypes = { Applet: ModelOf; AppletRevision: ModelOf; AppletRevisionConnection: ModelOf; - AppletRevisionCursor: ModelOf; Article: ModelOf
; ArticleRevision: ModelOf; ArticleRevisionConnection: ModelOf; - ArticleRevisionCursor: ModelOf; Boolean: ModelOf; CacheRemoveInput: ModelOf; CacheRemoveResponse: ModelOf; @@ -3188,15 +3137,12 @@ export type ResolversParentTypes = { CheckoutRevisionResponse: ModelOf; Comment: ModelOf; CommentConnection: ModelOf; - CommentEdge: ModelOf; Course: ModelOf; CoursePage: ModelOf; CoursePageRevision: ModelOf; CoursePageRevisionConnection: ModelOf; - CoursePageRevisionCursor: ModelOf; CourseRevision: ModelOf; CourseRevisionConnection: ModelOf; - CourseRevisionCursor: ModelOf; CreateCommentNotificationEvent: ModelOf; CreateEntityLinkNotificationEvent: ModelOf; CreateEntityNotificationEvent: ModelOf; @@ -3487,19 +3433,12 @@ export type AbstractUuidResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type AbstractUuidCursorResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type AddRevisionResponseResolvers = { query?: Resolver; revisionId?: Resolver, ParentType, ContextType>; @@ -3556,19 +3495,12 @@ export type AppletRevisionResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type AppletRevisionCursorResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type ArticleResolvers = { alias?: Resolver; currentRevision?: Resolver, ParentType, ContextType>; @@ -3604,19 +3536,12 @@ export type ArticleRevisionResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type ArticleRevisionCursorResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type CacheRemoveResponseResolvers = { query?: Resolver; success?: Resolver; @@ -3667,19 +3592,12 @@ export type CommentResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type CommentEdgeResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type CourseResolvers = { alias?: Resolver; currentRevision?: Resolver, ParentType, ContextType>; @@ -3731,19 +3649,12 @@ export type CoursePageRevisionResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type CoursePageRevisionCursorResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type CourseRevisionResolvers = { alias?: Resolver; author?: Resolver; @@ -3761,19 +3672,12 @@ export type CourseRevisionResolvers = { - edges?: Resolver, ParentType, ContextType>; nodes?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; totalCount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type CourseRevisionCursorResolvers = { - cursor?: Resolver; - node?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type CreateCommentNotificationEventResolvers = { actor?: Resolver; comment?: Resolver; @@ -4793,18 +4697,15 @@ export type Resolvers = { AbstractTaxonomyTermChild?: AbstractTaxonomyTermChildResolvers; AbstractUuid?: AbstractUuidResolvers; AbstractUuidConnection?: AbstractUuidConnectionResolvers; - AbstractUuidCursor?: AbstractUuidCursorResolvers; AddRevisionResponse?: AddRevisionResponseResolvers; AiQuery?: AiQueryResolvers; AllThreadsConnection?: AllThreadsConnectionResolvers; Applet?: AppletResolvers; AppletRevision?: AppletRevisionResolvers; AppletRevisionConnection?: AppletRevisionConnectionResolvers; - AppletRevisionCursor?: AppletRevisionCursorResolvers; Article?: ArticleResolvers; ArticleRevision?: ArticleRevisionResolvers; ArticleRevisionConnection?: ArticleRevisionConnectionResolvers; - ArticleRevisionCursor?: ArticleRevisionCursorResolvers; CacheRemoveResponse?: CacheRemoveResponseResolvers; CacheSetResponse?: CacheSetResponseResolvers; CacheUpdateResponse?: CacheUpdateResponseResolvers; @@ -4812,15 +4713,12 @@ export type Resolvers = { CheckoutRevisionResponse?: CheckoutRevisionResponseResolvers; Comment?: CommentResolvers; CommentConnection?: CommentConnectionResolvers; - CommentEdge?: CommentEdgeResolvers; Course?: CourseResolvers; CoursePage?: CoursePageResolvers; CoursePageRevision?: CoursePageRevisionResolvers; CoursePageRevisionConnection?: CoursePageRevisionConnectionResolvers; - CoursePageRevisionCursor?: CoursePageRevisionCursorResolvers; CourseRevision?: CourseRevisionResolvers; CourseRevisionConnection?: CourseRevisionConnectionResolvers; - CourseRevisionCursor?: CourseRevisionCursorResolvers; CreateCommentNotificationEvent?: CreateCommentNotificationEventResolvers; CreateEntityLinkNotificationEvent?: CreateEntityLinkNotificationEventResolvers; CreateEntityNotificationEvent?: CreateEntityNotificationEventResolvers; diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index c08d868b6..de872e53a 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -253,18 +253,11 @@ export type AbstractUuidEventsArgs = { export type AbstractUuidConnection = { __typename?: 'AbstractUuidConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type AbstractUuidCursor = { - __typename?: 'AbstractUuidCursor'; - cursor: Scalars['String']['output']; - node: AbstractUuid; -}; - export type AddRevisionResponse = { __typename?: 'AddRevisionResponse'; query: Query; @@ -389,18 +382,11 @@ export type AppletRevisionThreadsArgs = { export type AppletRevisionConnection = { __typename?: 'AppletRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type AppletRevisionCursor = { - __typename?: 'AppletRevisionCursor'; - cursor: Scalars['String']['output']; - node: AppletRevision; -}; - export type Article = AbstractEntity & AbstractRepository & AbstractTaxonomyTermChild & AbstractUuid & InstanceAware & ThreadAware & { __typename?: 'Article'; alias: Scalars['String']['output']; @@ -494,18 +480,11 @@ export type ArticleRevisionThreadsArgs = { export type ArticleRevisionConnection = { __typename?: 'ArticleRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type ArticleRevisionCursor = { - __typename?: 'ArticleRevisionCursor'; - cursor: Scalars['String']['output']; - node: ArticleRevision; -}; - export type CacheRemoveInput = { keys: Array; }; @@ -585,18 +564,11 @@ export type CommentEventsArgs = { export type CommentConnection = { __typename?: 'CommentConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CommentEdge = { - __typename?: 'CommentEdge'; - cursor: Scalars['String']['output']; - node: Comment; -}; - export enum CommentStatus { Done = 'done', NoStatus = 'noStatus', @@ -747,18 +719,11 @@ export type CoursePageRevisionThreadsArgs = { export type CoursePageRevisionConnection = { __typename?: 'CoursePageRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CoursePageRevisionCursor = { - __typename?: 'CoursePageRevisionCursor'; - cursor: Scalars['String']['output']; - node: CoursePageRevision; -}; - export type CourseRevision = AbstractEntityRevision & AbstractRevision & AbstractUuid & ThreadAware & { __typename?: 'CourseRevision'; alias: Scalars['String']['output']; @@ -797,18 +762,11 @@ export type CourseRevisionThreadsArgs = { export type CourseRevisionConnection = { __typename?: 'CourseRevisionConnection'; - edges: Array; nodes: Array; pageInfo: PageInfo; totalCount: Scalars['Int']['output']; }; -export type CourseRevisionCursor = { - __typename?: 'CourseRevisionCursor'; - cursor: Scalars['String']['output']; - node: CourseRevision; -}; - export type CreateCommentNotificationEvent = AbstractNotificationEvent & InstanceAware & { __typename?: 'CreateCommentNotificationEvent'; actor: User;