Skip to content

Commit

Permalink
Add isMyNDLAOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinewi committed Feb 12, 2025
1 parent 872edc5 commit 395e94c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@graphql-eslint/eslint-plugin": "^4.3.0",
"@graphql-tools/mock": "^9.0.9",
"@jest-mock/express": "^2.0.2",
"@ndla/types-backend": "^1.0.20",
"@ndla/types-backend": "^1.0.21",
"@ndla/types-embed": "^5.0.10-alpha.0",
"@ndla/types-taxonomy": "^1.0.34",
"@types/compression": "^1.7.2",
Expand Down
2 changes: 2 additions & 0 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export const typeDefs = gql`
status: String!
coverphoto: LearningpathCoverphoto
madeAvailable: String
isMyNDLAOwner: Boolean!
}
type MyNdlaLearningpath {
Expand All @@ -308,6 +309,7 @@ export const typeDefs = gql`
status: String!
coverphoto: LearningpathCoverphoto
madeAvailable: String
isMyNDLAOwner: Boolean!
}
input LearningpathEmbedInput {
Expand Down
10 changes: 10 additions & 0 deletions src/types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ export type GQLArticleRequiredLibrary = {

export type GQLArticleSearchResult = GQLSearchResult & {
__typename?: 'ArticleSearchResult';
context?: Maybe<GQLSearchContext>;
contexts: Array<GQLSearchContext>;
htmlTitle: Scalars['String']['output'];
id: Scalars['Int']['output'];
Expand Down Expand Up @@ -907,6 +908,7 @@ export type GQLLearningpath = {
duration?: Maybe<Scalars['Int']['output']>;
id: Scalars['Int']['output'];
isBasedOn?: Maybe<Scalars['Int']['output']>;
isMyNDLAOwner: Scalars['Boolean']['output'];
lastUpdated: Scalars['String']['output'];
learningstepUrl: Scalars['String']['output'];
learningsteps: Array<GQLLearningpathStep>;
Expand Down Expand Up @@ -975,6 +977,7 @@ export type GQLLearningpathNewInput = {

export type GQLLearningpathSearchResult = GQLSearchResult & {
__typename?: 'LearningpathSearchResult';
context?: Maybe<GQLSearchContext>;
contexts: Array<GQLSearchContext>;
htmlTitle: Scalars['String']['output'];
id: Scalars['Int']['output'];
Expand Down Expand Up @@ -1551,6 +1554,7 @@ export type GQLMyNdlaLearningpath = {
duration?: Maybe<Scalars['Int']['output']>;
id: Scalars['Int']['output'];
isBasedOn?: Maybe<Scalars['Int']['output']>;
isMyNDLAOwner: Scalars['Boolean']['output'];
lastUpdated: Scalars['String']['output'];
learningstepUrl: Scalars['String']['output'];
learningsteps: Array<GQLMyNdlaLearningpathStep>;
Expand Down Expand Up @@ -2357,6 +2361,7 @@ export type GQLSearchContextResourceTypes = {
};

export type GQLSearchResult = {
context?: Maybe<GQLSearchContext>;
contexts: Array<GQLSearchContext>;
htmlTitle: Scalars['String']['output'];
id: Scalars['Int']['output'];
Expand Down Expand Up @@ -3402,6 +3407,7 @@ export type GQLArticleRequiredLibraryResolvers<ContextType = any, ParentType ext
};

export type GQLArticleSearchResultResolvers<ContextType = any, ParentType extends GQLResolversParentTypes['ArticleSearchResult'] = GQLResolversParentTypes['ArticleSearchResult']> = {
context?: Resolver<Maybe<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
contexts?: Resolver<Array<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
htmlTitle?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
id?: Resolver<GQLResolversTypes['Int'], ParentType, ContextType>;
Expand Down Expand Up @@ -4002,6 +4008,7 @@ export type GQLLearningpathResolvers<ContextType = any, ParentType extends GQLRe
duration?: Resolver<Maybe<GQLResolversTypes['Int']>, ParentType, ContextType>;
id?: Resolver<GQLResolversTypes['Int'], ParentType, ContextType>;
isBasedOn?: Resolver<Maybe<GQLResolversTypes['Int']>, ParentType, ContextType>;
isMyNDLAOwner?: Resolver<GQLResolversTypes['Boolean'], ParentType, ContextType>;
lastUpdated?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
learningstepUrl?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
learningsteps?: Resolver<Array<GQLResolversTypes['LearningpathStep']>, ParentType, ContextType>;
Expand Down Expand Up @@ -4039,6 +4046,7 @@ export type GQLLearningpathFolderResourceMetaResolvers<ContextType = any, Parent
};

export type GQLLearningpathSearchResultResolvers<ContextType = any, ParentType extends GQLResolversParentTypes['LearningpathSearchResult'] = GQLResolversParentTypes['LearningpathSearchResult']> = {
context?: Resolver<Maybe<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
contexts?: Resolver<Array<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
htmlTitle?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
id?: Resolver<GQLResolversTypes['Int'], ParentType, ContextType>;
Expand Down Expand Up @@ -4237,6 +4245,7 @@ export type GQLMyNdlaLearningpathResolvers<ContextType = any, ParentType extends
duration?: Resolver<Maybe<GQLResolversTypes['Int']>, ParentType, ContextType>;
id?: Resolver<GQLResolversTypes['Int'], ParentType, ContextType>;
isBasedOn?: Resolver<Maybe<GQLResolversTypes['Int']>, ParentType, ContextType>;
isMyNDLAOwner?: Resolver<GQLResolversTypes['Boolean'], ParentType, ContextType>;
lastUpdated?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
learningstepUrl?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
learningsteps?: Resolver<Array<GQLResolversTypes['MyNdlaLearningpathStep']>, ParentType, ContextType>;
Expand Down Expand Up @@ -4644,6 +4653,7 @@ export type GQLSearchContextResourceTypesResolvers<ContextType = any, ParentType

export type GQLSearchResultResolvers<ContextType = any, ParentType extends GQLResolversParentTypes['SearchResult'] = GQLResolversParentTypes['SearchResult']> = {
__resolveType: TypeResolveFn<'ArticleSearchResult' | 'LearningpathSearchResult', ParentType, ContextType>;
context?: Resolver<Maybe<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
contexts?: Resolver<Array<GQLResolversTypes['SearchContext']>, ParentType, ContextType>;
htmlTitle?: Resolver<GQLResolversTypes['String'], ParentType, ContextType>;
id?: Resolver<GQLResolversTypes['Int'], ParentType, ContextType>;
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2141,10 +2141,10 @@ __metadata:
languageName: node
linkType: hard

"@ndla/types-backend@npm:^1.0.20":
version: 1.0.20
resolution: "@ndla/types-backend@npm:1.0.20"
checksum: 10c0/78a2e925e1aa6db788e202203453e189f7d1655748184ebb18eccc16c0aa4cbe464c63712d33b221e5fd185bf4cd8021b4855af9584d56b2575510d4c89b01ea
"@ndla/types-backend@npm:^1.0.21":
version: 1.0.21
resolution: "@ndla/types-backend@npm:1.0.21"
checksum: 10c0/994bcaf51c46317d62822c959b948d9caec2058c14b5c29c0e2769a7981d359b199ab2e3fa24d27881c00b47a69aea9c742fd7a0ca05e496c69e6b7cdbb48162
languageName: node
linkType: hard

Expand Down Expand Up @@ -7460,7 +7460,7 @@ __metadata:
"@graphql-tools/schema": "npm:^10.0.11"
"@jest-mock/express": "npm:^2.0.2"
"@ndla/licenses": "npm:^8.0.3-alpha.0"
"@ndla/types-backend": "npm:^1.0.20"
"@ndla/types-backend": "npm:^1.0.21"
"@ndla/types-embed": "npm:^5.0.10-alpha.0"
"@ndla/types-taxonomy": "npm:^1.0.34"
"@types/compression": "npm:^1.7.2"
Expand Down

0 comments on commit 395e94c

Please sign in to comment.