I have a working graphQL query which looks something like this
query( $ownerId: ID!){
getPets(ownerId:$ownerId){
id,
ownerDescription
...on Dog {
id
name
}
...on Cat {
id
name
}
}
}
What I want (but do not know how to achieve) is following
query( $ownerId: ID!){
getPets(ownerId:$ownerId){
id,
ownerDescription
...on (Dog | Cat) {
id
name
}
}
Is it even possible to reuse fields, in a way I want?
I have no control over the schema, so I hope to find a solution that can be implemented in the same place, where I do query.