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

Handle union return types #45

Open
Ludo978 opened this issue Oct 18, 2021 · 0 comments
Open

Handle union return types #45

Ludo978 opened this issue Oct 18, 2021 · 0 comments

Comments

@Ludo978
Copy link

Ludo978 commented Oct 18, 2021

I have requests that can have 2 return types using union.
Example:

union SuccessOrError = GraphqlError | Success

mutation deleteAccount($accountId: String!) {
  deleteAccount(accountId: $accountId) {
      ... on Success {
          success
          message
      }
      ... on GraphqlError {
          success
          message
          code
      }
  }
}

Dociql displays that:

{
  "data": {}
}

I tried to expand fields without success.
Do you have an idea of how can I make it works?

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