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

graphql file can't contain only import statements #23

Open
macrozone opened this issue Feb 20, 2018 · 1 comment
Open

graphql file can't contain only import statements #23

macrozone opened this issue Feb 20, 2018 · 1 comment

Comments

@macrozone
Copy link

if i have a file typeDefs.graphql which contains

#import "./Query.graphql"
#import "./Mutation.graphql"
#import "./User.graphql"

then i get this error:

imports/api/graphql/typeDefs.graphql:3:25: Syntax Error: Unexpected <EOF>

workaround is to add a dummy type at the end:

#import "./Query.graphql"
#import "./Mutation.graphql"
#import "./User.graphql"


type Test {
  test: Boolean
}
@jamiter
Copy link
Contributor

jamiter commented Feb 21, 2018

@macrozone, thanks for reporting this. Appearantly this is how it's implemented in https://github.com/apollographql/graphql-tag. That's the package I'm using under the hood. If you would like to see this changes, please report it there and I'll make sure this package get's updated once it's implemented.

Cheers

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

No branches or pull requests

2 participants