Is your feature request related to a problem? Please describe.
When selecting a union type, it's not possible to match via a base interface, this prevents us from matching on Error to determine if any error happened.
Describe the solution you'd like
Given the schema:
interface Error {
message: String!
}
type NotFoundError implements Error {
message: String!
code: String!
}
union UpdateTripError = NotFoundError
type UpdateTripPayload {
trip: Trip
errors: [UpdateTripError!]
}
I would like to be able to generate a query equivalent to:
updateTrip($input) {
trip {
comment
}
errors {
... on Error {
message
}
}
}
graphClient.Mutation(q => q.UpdateTrip(..., o => new { Error = o.Errors(oo => oo.On<Error>().Select(ooo => ooo.Message)) }));
This is currently not possible, due to Error not being part of the union type UpdateTripError.
The query does work when queried directly against the GraphQL backend.
Is your feature request related to a problem? Please describe.
When selecting a union type, it's not possible to match via a base interface, this prevents us from matching on
Errorto determine if any error happened.Describe the solution you'd like
Given the schema:
I would like to be able to generate a query equivalent to:
This is currently not possible, due to
Errornot being part of the union typeUpdateTripError.The query does work when queried directly against the GraphQL backend.