Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions local-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ config:
maybeValue: T
typesPrefix: GQL
inlineFragmentTypes: combine
enumsAsTypes: true
scalars:
StringOrNull: "string | null"
16 changes: 11 additions & 5 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ export const typeDefs = gql`
width: Int!
}

enum LearningpathStepType {
ARTICLE
EXTERNAL
TEXT
}

interface BaseLearningpathStep {
id: Int!
title: String!
Expand All @@ -215,7 +221,7 @@ export const typeDefs = gql`
revision: Int!
status: String!
supportedLanguages: [String!]!
type: String!
type: LearningpathStepType!
articleId: Int
resource(rootId: String, parentId: String): Resource
showTitle: Boolean!
Expand All @@ -237,7 +243,7 @@ export const typeDefs = gql`
revision: Int!
status: String!
supportedLanguages: [String!]!
type: String!
type: LearningpathStepType!
articleId: Int
resource(rootId: String, parentId: String): Resource
showTitle: Boolean!
Expand All @@ -259,7 +265,7 @@ export const typeDefs = gql`
revision: Int!
status: String!
supportedLanguages: [String!]!
type: String!
type: LearningpathStepType!
articleId: Int
resource(rootId: String, parentId: String): Resource
showTitle: Boolean!
Expand Down Expand Up @@ -414,7 +420,7 @@ export const typeDefs = gql`
language: String!
embedUrl: LearningpathEmbedInput
showTitle: Boolean!
type: String!
type: LearningpathStepType!
license: String
copyright: LearningpathCopyrightInput
}
Expand All @@ -428,7 +434,7 @@ export const typeDefs = gql`
description: String
embedUrl: LearningpathEmbedInput
showTitle: Boolean
type: String
type: LearningpathStepType
license: String
copyright: LearningpathCopyrightInput
}
Expand Down
20 changes: 13 additions & 7 deletions src/types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export type GQLBaseLearningpathStep = {
status: Scalars['String']['output'];
supportedLanguages: Array<Scalars['String']['output']>;
title: Scalars['String']['output'];
type: Scalars['String']['output'];
type: GQLLearningpathStepType;
};


Expand Down Expand Up @@ -763,7 +763,7 @@ export type GQLLearningpathStep = GQLBaseLearningpathStep & {
status: Scalars['String']['output'];
supportedLanguages: Array<Scalars['String']['output']>;
title: Scalars['String']['output'];
type: Scalars['String']['output'];
type: GQLLearningpathStepType;
};


Expand All @@ -788,7 +788,7 @@ export type GQLLearningpathStepNewInput = {
license?: InputMaybe<Scalars['String']['input']>;
showTitle: Scalars['Boolean']['input'];
title: Scalars['String']['input'];
type: Scalars['String']['input'];
type: GQLLearningpathStepType;
};

export type GQLLearningpathStepOembed = {
Expand All @@ -800,6 +800,11 @@ export type GQLLearningpathStepOembed = {
width: Scalars['Int']['output'];
};

export type GQLLearningpathStepType =
| 'ARTICLE'
| 'EXTERNAL'
| 'TEXT';

export type GQLLearningpathStepUpdateInput = {
articleId?: InputMaybe<Scalars['Int']['input']>;
copyright?: InputMaybe<GQLLearningpathCopyrightInput>;
Expand All @@ -811,7 +816,7 @@ export type GQLLearningpathStepUpdateInput = {
revision: Scalars['Int']['input'];
showTitle?: InputMaybe<Scalars['Boolean']['input']>;
title?: InputMaybe<Scalars['String']['input']>;
type?: InputMaybe<Scalars['String']['input']>;
type?: InputMaybe<GQLLearningpathStepType>;
};

export type GQLLearningpathUpdateInput = {
Expand Down Expand Up @@ -1216,7 +1221,7 @@ export type GQLMyNdlaLearningpathStep = GQLBaseLearningpathStep & {
status: Scalars['String']['output'];
supportedLanguages: Array<Scalars['String']['output']>;
title: Scalars['String']['output'];
type: Scalars['String']['output'];
type: GQLLearningpathStepType;
};


Expand Down Expand Up @@ -2420,6 +2425,7 @@ export type GQLResolversTypes = {
LearningpathStepEmbedUrl: ResolverTypeWrapper<GQLLearningpathStepEmbedUrl>;
LearningpathStepNewInput: GQLLearningpathStepNewInput;
LearningpathStepOembed: ResolverTypeWrapper<GQLLearningpathStepOembed>;
LearningpathStepType: GQLLearningpathStepType;
LearningpathStepUpdateInput: GQLLearningpathStepUpdateInput;
LearningpathUpdateInput: GQLLearningpathUpdateInput;
License: ResolverTypeWrapper<GQLLicense>;
Expand Down Expand Up @@ -3265,7 +3271,7 @@ export type GQLLearningpathStepResolvers<ContextType = any, ParentType extends G
status?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
supportedLanguages?: Resolver<Array<GQLResolversTypes['String']>, ParentType, ContextType>;
title?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
type?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
type?: Resolver<GQLResolversTypes['LearningpathStepType'], ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

Expand Down Expand Up @@ -3472,7 +3478,7 @@ export type GQLMyNdlaLearningpathStepResolvers<ContextType = any, ParentType ext
status?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
supportedLanguages?: Resolver<Array<GQLResolversTypes['String']>, ParentType, ContextType>;
title?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
type?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
type?: Resolver<GQLResolversTypes['LearningpathStepType'], ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

Expand Down
Loading