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

importing .graphql file with interface not working. #34

Open
danyhiol opened this issue Aug 1, 2018 · 2 comments
Open

importing .graphql file with interface not working. #34

danyhiol opened this issue Aug 1, 2018 · 2 comments

Comments

@danyhiol
Copy link

danyhiol commented Aug 1, 2018

My app is very modular and provides an interface that can be implemented by other types.
Example:

//animal.graphql
enum A{
  hunted,
  hunter,
}
interface Animal{
  _id: String!
  name: String!
  group: A!
}
//dog.graphql
#import "./animal.graphql";
type Dog implements Animal{
  _id: String!
  name: String!
  ayes: Int!
}

Is it possible to import a .graphql file where an interface is defined?

@jamiter
Copy link
Contributor

jamiter commented Aug 3, 2018

Hm, I would think this should work. I'll need to investigate.

A PR with a failing test would be great.

@danyhiol
Copy link
Author

danyhiol commented Aug 5, 2018

I don't know if I'm doing something wrong, but importing .graphql file in .graphql file is not working.
I get Type "schema" not found in document. Check this example out.

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