Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I return a union type on outputFields? #367

Open
noghartt opened this issue Dec 8, 2021 · 0 comments
Open

Can I return a union type on outputFields? #367

noghartt opened this issue Dec 8, 2021 · 0 comments

Comments

@noghartt
Copy link
Contributor

noghartt commented Dec 8, 2021

Is there a way that I can return a union type on outputFields? I want to do something like it:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant