meteor-graphql icon indicating copy to clipboard operation
meteor-graphql copied to clipboard

importing .graphql file with interface not working.

Open danyhiol opened this issue 6 years ago • 2 comments

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?

danyhiol avatar Aug 01 '18 16:08 danyhiol

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

A PR with a failing test would be great.

jamiter avatar Aug 03 '18 15:08 jamiter

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.

danyhiol avatar Aug 05 '18 20:08 danyhiol