easygraphql-tester icon indicating copy to clipboard operation
easygraphql-tester copied to clipboard

Syntax Error: Unexpected <EOF>

Open bublig737 opened this issue 6 years ago • 5 comments

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

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

bublig737 avatar Jul 02 '19 15:07 bublig737

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

estrada9166 avatar Jul 02 '19 15:07 estrada9166

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 avatar Jul 02 '19 15:07 bublig737

as we can see, LEXER is imports image

bublig737 avatar Jul 02 '19 15:07 bublig737

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 avatar Jul 02 '19 15:07 bublig737

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'

bublig737 avatar Jul 03 '19 07:07 bublig737