haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Support interfaces #104

Open jml opened 7 years ago

jml commented 7 years ago

We have some support for interfaces, but it's not at all clear how you'd implement a handler for something like:

type Query {
  dog: Dog
} 

type Dog {
  name: Text!
  owner: Sentient
}

interface Sentient {
  name: Text!
}

type Human implements Sentient {
  name: Text!
}

What would the Haskell implementation for dog.owner look like?