From 44a7a5e692269df4bbde2e7dd9a7d2adbe3ba69c Mon Sep 17 00:00:00 2001 From: Alessio Gravili Date: Mon, 4 Mar 2024 09:44:13 -0500 Subject: [PATCH] chore(richtext-lexical): fix failing int test due to usage of old GraphQL client --- test/fields/lexical.int.spec.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/fields/lexical.int.spec.ts b/test/fields/lexical.int.spec.ts index fee8b071b1..cb1945327a 100644 --- a/test/fields/lexical.int.spec.ts +++ b/test/fields/lexical.int.spec.ts @@ -206,17 +206,16 @@ describe('Lexical', () => { } } }` - const response: { - RichTextFields: PaginatedDocs - } = await graphQLClient.request( - query, - {}, - { - Authorization: `JWT ${token}`, - }, - ) - const { docs } = response.RichTextFields + const response: { + data: { RichTextFields: PaginatedDocs } + } = await restClient + .GRAPHQL_POST({ + body: JSON.stringify({ query }), + }) + .then((res) => res.json()) + + const { docs } = response.data.RichTextFields const uploadNode: SerializedUploadNode = docs[0].lexicalCustomFields.root.children.find( (node) => node.type === 'upload',