graphql / graphql/graphql-relay-js
Can I return a union type on `outputFields`?
Open
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 177
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
Is there a way that I can return a union type on `outputFields`? I want to do something like it:
```graphql
mutation userRegister($input: UserRegisterInput!) {
userRegister(input: $input) {
... on UserRegisterResultSuccess {
user {
id
}
}
... on Error {
message
}
}
}
```
I would like to know if there's a way to do it on `outputFields` of a mutation.
Contributor guide
Assessment
This issue has not been assessed yet.