diff --git a/.prettierignore b/.prettierignore index d681ddb3e42..e36c8f8cb2a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,6 +4,3 @@ working-group/ packages/codemirror-graphql/src/__tests__/schema-kitchen-sink.graphql CHANGELOG.md - -# remove after merge of https://github.com/graphql/graphiql/pull/3256 -*.flow diff --git a/packages/graphql-language-service/src/interface/index.js.flow b/packages/graphql-language-service/src/interface/index.js.flow deleted file mode 100644 index 8b856056bdf..00000000000 --- a/packages/graphql-language-service/src/interface/index.js.flow +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Copyright (c) 2021 GraphQL Contributors - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import type { - Outline, - Diagnostic, - ContextToken, - ContextTokenUnion, - IPosition, - DefinitionQueryResult, - Uri, - GraphQLCache, - CompletionItem, - CompletionItemBase, - TypeInfo, - State, -} from 'graphql-language-service'; -import type { ValidationRule, GraphQLSchema } from 'graphql'; -import type { Hover } from 'vscode-languageserver-types'; -import { GraphQLDirective } from "graphql"; -import type { FragmentDefinitionNode } from "graphql"; - -declare export function getOutline(queryText: string): ?Outline; -declare export function getDiagnostics( - query: string, - schema: ?GraphQLSchema, - customRules?: Array, - isRelayCompatMode?: boolean, - externalFragments?: Array | string -): Array; - -declare export function getAutocompleteSuggestions( - schema: GraphQLSchema, - queryText: string, - cursor: IPosition, - contextToken?: ContextToken, - externalFragments?: Array -): Array; - -declare export class GraphQLLanguageService { - constructor(cache: GraphQLCache): GraphQLLanguageService; - - getDefinition( - query: string, - position: IPosition, - filePath: Uri, - ): Promise; - - getDiagnostics( - query: string, - uri: Uri, - isRelayCompatMode?: boolean, - ): Promise>; - - getHoverInformation( - query: string, - position: IPosition, - filePath: Uri, - ): Promise; - - getAutocompleteSuggestions( - query: string, - position: IPosition, - filePath: Uri, - ): Promise>; -} -declare export function canUseDirective( - state: $PropertyType, - directive: GraphQLDirective -): boolean; -declare export function getDefinitionState( - tokenState: State -): State | null | void; -declare export function getFragmentDefinitions( - queryText: string -): Array; -declare export function getTypeInfo( - schema: GraphQLSchema, - tokenState: State -): TypeInfo; -declare export function hintList( - token: ContextTokenUnion, - list: Array -): Array; -declare export function objectValues(object: { - [key: string]: any, -}): Array; diff --git a/packages/graphql-language-service/src/utils/index.js.flow b/packages/graphql-language-service/src/utils/index.js.flow deleted file mode 100644 index 5dfe519b675..00000000000 --- a/packages/graphql-language-service/src/utils/index.js.flow +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2021 GraphQL Contributors - * All rights reserved. - * - * This source code is licensed under the license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -import type { Location } from 'graphql/language'; - -import type { - IRange, - IPosition , -} from 'graphql-language-service'; - -declare export function getASTNodeAtPosition(): void; - -declare export class Position implements IPosition { - line: number; - character: number; - constructor(row: number, column: number): IPosition; - lessThanOrEqualTo: (position: IPosition) => boolean; -} - -declare export class Range implements IRange { - start: IPosition; - end: IPosition; - constructor(start: IPosition, end: IPosition): IRange; - containsPosition: (position: IPosition) => boolean; -} -