Skip to content

Commit 5850280

Browse files
committed
Add context and context for nodehit
1 parent 805f556 commit 5850280

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Build stage
2-
FROM node:20.13-alpine3.18 as builder
2+
FROM node:20.13-alpine3.18 AS builder
33

44
ENV HOME=/home/app
55
ENV APP_PATH=$HOME/graphql-api

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@graphql-eslint/eslint-plugin": "^4.3.0",
5959
"@graphql-tools/mock": "^9.0.9",
6060
"@jest-mock/express": "^2.0.2",
61-
"@ndla/types-backend": "^1.0.33",
61+
"@ndla/types-backend": "^1.0.34",
6262
"@ndla/types-embed": "^5.0.10-alpha.0",
6363
"@ndla/types-taxonomy": "^1.0.34",
6464
"@types/compression": "^1.7.2",

src/api/searchApi.ts

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export async function groupSearch(searchQuery: GQLQuerySearchArgs, context: Cont
8383
title: result.title.title,
8484
htmlTitle: result.title.htmlTitle,
8585
ingress: result.metaDescription.metaDescription,
86+
context: result.context,
8687
contexts: result.contexts,
8788
};
8889
})
@@ -139,6 +140,7 @@ const transformResult = (result: IMultiSearchSummaryDTO | INodeHitDTO, subjects:
139140
metaDescription: result.subjectPage?.metaDescription.metaDescription ?? "",
140141
id: result.id,
141142
url: result.url ?? "",
143+
context: result.context,
142144
contexts: [],
143145
};
144146
return ret;

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -2141,10 +2141,10 @@ __metadata:
21412141
languageName: node
21422142
linkType: hard
21432143

2144-
"@ndla/types-backend@npm:^1.0.33":
2145-
version: 1.0.33
2146-
resolution: "@ndla/types-backend@npm:1.0.33"
2147-
checksum: 10c0/0a093a1ac11d63617fe1c533a704299124ab1b44eb824ed818bcd1cde3e2335d7012223ebcf5bc49e1de996c4f3ba8244185d1c653448a074b77e637d6e0bedb
2144+
"@ndla/types-backend@npm:^1.0.34":
2145+
version: 1.0.34
2146+
resolution: "@ndla/types-backend@npm:1.0.34"
2147+
checksum: 10c0/f13b8a1f0bb3e57c3210c03b1daabdfae9b2f5cf22c0f9282ece86d2765a353390e6a1770a00bd6e1d8148248938668d147040dc333f0c1d0490bb7d4dcd0994
21482148
languageName: node
21492149
linkType: hard
21502150

@@ -7453,7 +7453,7 @@ __metadata:
74537453
"@graphql-tools/schema": "npm:^10.0.11"
74547454
"@jest-mock/express": "npm:^2.0.2"
74557455
"@ndla/licenses": "npm:^9.0.0"
7456-
"@ndla/types-backend": "npm:^1.0.33"
7456+
"@ndla/types-backend": "npm:^1.0.34"
74577457
"@ndla/types-embed": "npm:^5.0.10-alpha.0"
74587458
"@ndla/types-taxonomy": "npm:^1.0.34"
74597459
"@types/compression": "npm:^1.7.2"

0 commit comments

Comments
 (0)