From ec30fe4a67fec50cb1c5501fc1063175ab640e93 Mon Sep 17 00:00:00 2001 From: Robin Moffatt Date: Thu, 18 Jan 2024 16:26:59 +0000 Subject: [PATCH 1/2] fix: fix nested types issue --- schema.graphql | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/schema.graphql b/schema.graphql index 9f14c0d..c95f954 100644 --- a/schema.graphql +++ b/schema.graphql @@ -13,25 +13,18 @@ type School { } type ProfileItems { - items: String - banner: String - helpBannerTitle: String - helpBannerBody: String - whatToExpect: String - actionText: String + items: String! + banner: String! + helpBannerTitle: String! + helpBannerBody: String! + whatToExpect: String! + actionText: String! } type SchoolProfile { - request: { - items: String - banner: String - helpBannerTitle: String - helpBannerBody: String - whatToExpect: String - actionText: String - } - donate: ProfileItems! - excess: ProfileItems! + request: ProfileItems + donate: ProfileItems + excess: ProfileItems } type LocalAuthorityUser { From 970511b70b221114cdc60ad886161a02b880a399 Mon Sep 17 00:00:00 2001 From: Robin Moffatt Date: Fri, 19 Jan 2024 15:56:19 +0000 Subject: [PATCH 2/2] fix: fix nested types issue --- src/repository/schoolProfileRepository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/schoolProfileRepository.ts b/src/repository/schoolProfileRepository.ts index 77831f6..1a57410 100644 --- a/src/repository/schoolProfileRepository.ts +++ b/src/repository/schoolProfileRepository.ts @@ -44,7 +44,7 @@ export class SchoolProfileRepository { await this.collection.updateOne( { name }, { - $set: { [key]: value }, + $set: { [key]: { test: 2 } }, $setOnInsert: { name }, }, { upsert: true }