movio / bramble

A federated GraphQL API gateway
https://movio.github.io/bramble/
MIT License
497 stars 55 forks source link

introspection query possible types not returned for interace #149

Closed jainpiyush19 closed 2 years ago

jainpiyush19 commented 2 years ago

The current implementation of possible types in the introspection query does not return values for interface types. Ex: Schema

interface Person { name: String! }
type Cast implements Person {
    name: String!
}

Introspection query

{
    __type(name: "Person") {
        kind
        name
        possibleTypes {
        name
    }
    }
}

Result :

{
  "__type": {
    "kind": "INTERFACE",
    "name": "Person",
    "possibleTypes": null
  }
}

Expected Result

{
  "__type": {
    "kind": "INTERFACE",
    "name": "Person",
    "possibleTypes": [
      {
        "name": "Cast"
      }
    ]
  }
}
jainpiyush19 commented 2 years ago

Fix #148