From 733f4e3c6cebec2e3a69c8a3881f546e72bdbd10 Mon Sep 17 00:00:00 2001 From: James Gatz Date: Tue, 30 Apr 2024 11:56:19 +0200 Subject: [PATCH] Add schema to hintOptions (#7342) --- .../src/ui/components/editors/body/graph-ql-editor.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx b/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx index 41b46b53756..5aa26512427 100644 --- a/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx +++ b/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx @@ -1,6 +1,7 @@ import { LintOptions, ShowHintOptions, TextMarker } from 'codemirror'; -import { GraphQLInfoOptions } from 'codemirror-graphql/info'; -import { ModifiedGraphQLJumpOptions } from 'codemirror-graphql/jump'; +import type { GraphQLHintOptions } from 'codemirror-graphql/hint'; +import type { GraphQLInfoOptions } from 'codemirror-graphql/info'; +import type { ModifiedGraphQLJumpOptions } from 'codemirror-graphql/jump'; import type { OpenDialogOptions } from 'electron'; import { readFileSync } from 'fs'; import { DefinitionNode, DocumentNode, GraphQLNonNull, GraphQLSchema, Kind, NonNullTypeNode, OperationDefinitionNode, parse, typeFromAST } from 'graphql'; @@ -430,7 +431,7 @@ export const GraphQLEditor: FC = ({ } let graphqlOptions: { - hintOptions: ShowHintOptions; + hintOptions: GraphQLHintOptions & ShowHintOptions; infoOptions: GraphQLInfoOptions; jumpOptions: ModifiedGraphQLJumpOptions; lintOptions: LintOptions; @@ -449,6 +450,7 @@ export const GraphQLEditor: FC = ({ graphqlOptions = { hintOptions: { completeSingle: false, + schema, }, infoOptions: { schema,