EasyGraphQL / easygraphql-tester

Test GraphQL queries, mutations and schemas on an easy way! 🚀
https://easygraphql.com/docs/easygraphql-tester/overview
MIT License
313 stars 34 forks source link

Syntax Error: Unexpected <EOF> #112

Open bublig737 opened 5 years ago

bublig737 commented 5 years ago

Hello After invoke EasyGraphQLTester constructor i have the Syntax Error: Unexpected

I did console the Lexure which parses on that time and this lexure is #imports

estrada9166 commented 5 years ago

Can you share a snippet of your code, please! so I can reproduce it.

bublig737 commented 5 years ago

Wow, thank you for quick reply. My JavaScript code is simply:

import EasyGraphQLTester from 'easygraphql-tester'

import models from '../models/models.graphql'
import modules from '../modules/index.graphql'
import typeDefs from '../typeDefs/scalars/index.graphql'
import directives from '../directives/directives.graphql'

let tester = new EasyGraphQLTester([models, modules, typeDefs, directives])

*.graphql schemas has an imports by whose the graphQl parser thows this Error on 148 line on the follow screenshot

image

bublig737 commented 5 years ago

as we can see, LEXER is imports image

bublig737 commented 5 years ago

Oh im sorry, maybe I did show my problem not enough clearly graphQL parser is advance library in node_modules on path node_modules/graphql/language/parser.js

Can you please help me with this problem? How i can pass schemas with #imports lexures through the EasyGraphQLTester constructor ?

bublig737 commented 5 years ago

Can you share a snippet of your code, please! so I can reproduce it.

Hello! You can reproduce it Error by invoke EasyGraphQLTester constructor with schemas that includes imports For example:

# import *, from '../models/models.graphql'
# import *, from '../modules/index.graphql'
# import *, from './scalars/index.graphql'
# import *, from '../directives/directives.graphql'