graphql-ppx
graphql-ppx copied to clipboard
__typename on unions not working
testing master with a sdl schema, looks like i can get __typename on unions.
schema {
query: Queries
}
type Queries {
getUsers: [User!]!
}
type User {
id: String!
role: Role!
}
union Role = Admin | Member
type Admin {
y: Int!
}
type Member {
x: Int!
}
query:
query {
getUsers {
role {
... on Member {
__typename
x
}
... on Admin {
y
}
}
}
}
Ah hmm that is probably some implicit type that I forgot to include, thanks for catching it!