message: Kill off 3 more Flow errors
diff: */
  import type {
  + ASTNode,
  FragmentSpreadNode,
  FragmentDefinitionNode,
  OperationDefinitionNode,
  -} from 'graphql/language';
  +} from 'graphql';
  import type {
  Definition,
  DefinitionQueryResult,
  FragmentInfo,
  + Range,
  Uri,
  } from 'graphql-language-service-types';
  import {locToRange, offsetToPosition} from 'graphql-language-service-utils';
  +import invariant from 'assert';
  export const LANGUAGE = 'GraphQL';
  +function getRange(text: string, node: ASTNode): Range {
  + const location = node.loc;
  + invariant(location, 'Expected ASTNode to have a location.');
  + return locToRange(text, location);
  +}
  +
  export async function getDefinitionQueryResultForFragmentSpread(
  text: string,
  fragment: FragmentSpreadNode,
  @@ -44,7 +53,7 @@ export async function getDefinitionQueryResultForFragmentSpread(
  getDefinitionForFragmentDefinition(filePath || '', content, definition));
  return {
  definitions,
  - queryRange: definitions.map(_ => locToRange(text, fragment.loc)),
  + queryRange: definitions.map(_ => getRange(text, fragment)),
  };
  }
  @@ -55,7 +64,7 @@ export function getDefinitionQueryResultForDefinitionNode(
  ): DefinitionQueryResult {
  return {
  definitions: [getDefinitionForFragmentDefinition(path, text, definition)],
  - queryRange: [locToRange(text, definition.name.loc)],
  + queryRange: [getRange(text, definition.name)],
  };
  }
  @@ -67,7 +76,7 @@ function getDefinitionForFragmentDefinition(
  return {
  path,
  position: offsetToPosition(text, definition.name.loc.start),
  - range: locToRange(text, definition.loc),
  + range: getRange(text, definition),
  name: definition.name.value,
  language: LANGUAGE,
  // This is a file inside the project root, good enough for now
  