gqlQuery.ts (hoppscotch-2.2.1) | : | gqlQuery.ts (hoppscotch-3.0.0) | ||
---|---|---|---|---|
import { Ref } from "@nuxtjs/composition-api" | import { Ref } from "vue" | |||
import { GraphQLSchema } from "graphql" | import { GraphQLSchema } from "graphql" | |||
import { getAutocompleteSuggestions } from "graphql-language-service-interface" | import { getAutocompleteSuggestions } from "graphql-language-service-interface" | |||
import { Completer, CompleterResult, CompletionEntry } from "." | import { Completer, CompleterResult, CompletionEntry } from "." | |||
const completer: (schemaRef: Ref<GraphQLSchema | null>) => Completer = | const completer: (schemaRef: Ref<GraphQLSchema | null>) => Completer = | |||
(schemaRef: Ref<GraphQLSchema | null>) => (text, completePos) => { | (schemaRef: Ref<GraphQLSchema | null>) => (text, completePos) => { | |||
if (!schemaRef.value) return Promise.resolve(null) | if (!schemaRef.value) return Promise.resolve(null) | |||
const completions = getAutocompleteSuggestions(schemaRef.value, text, { | const completions = getAutocompleteSuggestions(schemaRef.value, text, { | |||
line: completePos.line, | line: completePos.line, | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |