From f163ecaac43bb41adca362ed54ae0e8fdb9fcbfc Mon Sep 17 00:00:00 2001 From: James Date: Sun, 12 Apr 2020 09:27:08 -0400 Subject: [PATCH] adds missing relationTo value --- src/graphql/schema/buildMutationInputType.js | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/graphql/schema/buildMutationInputType.js b/src/graphql/schema/buildMutationInputType.js index 38867753d2..95fd4c3acc 100644 --- a/src/graphql/schema/buildMutationInputType.js +++ b/src/graphql/schema/buildMutationInputType.js @@ -65,20 +65,23 @@ function buildMutationInputType(name, fields, parentName) { type = new GraphQLInputObjectType({ name: fullName, fields: { - relationTo: new GraphQLEnumType({ - name: `${fullName}RelationTo`, - values: field.relationTo.reduce((values, option) => ({ - ...values, - [option]: { - value: option, - }, - }), {}), - }), + relationTo: { + type: new GraphQLEnumType({ + name: `${fullName}RelationTo`, + values: field.relationTo.reduce((values, option) => ({ + ...values, + [option]: { + value: option, + }, + }), {}), + }), + }, + value: { type: GraphQLString }, }, }); } - return field.hasMany ? new GraphQLList(type) : type; + return { type: field.hasMany ? new GraphQLList(type) : type }; }, repeater: (field) => { const fullName = combineParentName(parentName, field.label);