diff --git a/.changeset/large-actors-worry.md b/.changeset/large-actors-worry.md new file mode 100644 index 00000000000..8a632af6836 --- /dev/null +++ b/.changeset/large-actors-worry.md @@ -0,0 +1,5 @@ +--- +'@keystone-next/keystone': patch +--- + +Fixed Relationship field inline connect throwing 400 errors when selecting a value. diff --git a/packages/keystone/src/fields/types/relationship/views/cards/index.tsx b/packages/keystone/src/fields/types/relationship/views/cards/index.tsx index 209cd486dfa..5922fbe380f 100644 --- a/packages/keystone/src/fields/types/relationship/views/cards/index.tsx +++ b/packages/keystone/src/fields/types/relationship/views/cards/index.tsx @@ -310,7 +310,7 @@ export function Cards({ try { const { data, errors } = await client.query({ query: gql`query ($ids: [ID!]!) { - items: ${foreignList.gqlNames.listQueryName}(where: {id_in:$ids}) { + items: ${foreignList.gqlNames.listQueryName}(where: { id: { in: $ids }}) { ${selectedFields} } }`,