UNPKG

apollo-codegen

Version:

Generate API code or type annotations based on a GraphQL schema and query documents

17 lines (12 loc) 425 B
import { readFileSync } from 'fs'; import * as path from 'path'; import { loadAndMergeQueryDocuments } from '../src/loading'; describe('Validation', () => { test(`should extract gql snippet from javascript file`, () => { const inputPaths = [ path.join(__dirname, './starwars/gqlQueries.js'), ]; const document = loadAndMergeQueryDocuments(inputPaths); expect(document).toMatchSnapshot(); }) });