Skip to content

Handle union return types #45

@Ludo978

Description

@Ludo978

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions