From 83e727414dec64f220d5adc647a73641ab701844 Mon Sep 17 00:00:00 2001 From: Josh Calder Date: Wed, 5 Apr 2023 16:55:02 +1000 Subject: [PATCH 1/3] Output x.value --- packages/fields-document/src/structure-graphql-output.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fields-document/src/structure-graphql-output.tsx b/packages/fields-document/src/structure-graphql-output.tsx index dab1726f485..238feadfa3e 100644 --- a/packages/fields-document/src/structure-graphql-output.tsx +++ b/packages/fields-document/src/structure-graphql-output.tsx @@ -62,7 +62,7 @@ function getOutputGraphQLFieldInner( meta: FieldData ): OutputField { if (schema.kind === 'form') { - return wrapGraphQLFieldInResolver(schema.graphql.output, x => x); + return wrapGraphQLFieldInResolver(schema.graphql.output, x => x.value); } if (schema.kind === 'object') { return graphql.field({ From 9a738a22818b6f3c2545600448392852fca38773 Mon Sep 17 00:00:00 2001 From: Josh Calder Date: Wed, 5 Apr 2023 16:56:35 +1000 Subject: [PATCH 2/3] add changeset --- .changeset/shiny-dolphins-move.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shiny-dolphins-move.md diff --git a/.changeset/shiny-dolphins-move.md b/.changeset/shiny-dolphins-move.md new file mode 100644 index 00000000000..f57d5150a7b --- /dev/null +++ b/.changeset/shiny-dolphins-move.md @@ -0,0 +1,5 @@ +--- +'@keystone-6/fields-document': patch +--- + +Fixes structured JSON output types when using `structure` From a6befcf970be54f5bb35c1ebef733d37462f0f8f Mon Sep 17 00:00:00 2001 From: Daniel Cousens <413395+dcousens@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:58:39 +1000 Subject: [PATCH 3/3] update changeset --- .changeset/shiny-dolphins-move.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/shiny-dolphins-move.md b/.changeset/shiny-dolphins-move.md index f57d5150a7b..29b1d35ab1f 100644 --- a/.changeset/shiny-dolphins-move.md +++ b/.changeset/shiny-dolphins-move.md @@ -2,4 +2,4 @@ '@keystone-6/fields-document': patch --- -Fixes structured JSON output types when using `structure` +Fixes the JSON output type values for the structure field