Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors from graphql-tag are not reported #51

Open
yurtsiv opened this issue Nov 19, 2020 · 1 comment
Open

Errors from graphql-tag are not reported #51

yurtsiv opened this issue Nov 19, 2020 · 1 comment

Comments

@yurtsiv
Copy link

yurtsiv commented Nov 19, 2020

Hi,

when a .graphql file has syntax errors, Meteor just reports Error: Cannot find module 'myFile.graphql'
instead of printing an error from graphql-tag loader.

f.e.

/schema.graphql

# 'typ' instead of 'type'
typ Query
   test: String
}

/index.ts

import schema from './schema.graphql';

will fail with Cannot find module './schema.graphql'. When I fix the syntax error, everything works fine.

I've played around with the package a bit, and the file.error get's called here, but Meteor seems to ignore that for some reason.

I'm not sure if it's a problem with the package or Meteor or my code.

I use [email protected]

Thanks!

@yurtsiv yurtsiv changed the title Errors from graphql-tag are not logged Errors from graphql-tag are not reported Nov 19, 2020
@kolyasya
Copy link

@yurtsiv yeah, thank you for reporting this, I spent 10 minutes trying to understand why Meteor doesn't see my .graphql file to import.
Ended up just with an issue in the file itself, imports fine after fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants