Skip to content

Commit

Permalink
Merge pull request #397 from canyongbs/bugfix/ADVAPP-115-prospect-api…
Browse files Browse the repository at this point in the history
…-first_name-bug

Add documentation for GraphQL Union field bug
  • Loading branch information
Orrison authored Dec 26, 2023
2 parents 35b127f + 16888db commit 4d2f59d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spectaql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ info:
x-introItems:
- title: Authorization
description: Add additional details for authentication. Supports `markdown`, more sections can be added.
- title: Querying the same field for different union types
description: |
When querying a field that returns a union type, you may get back an error "conflict because they return conflicting types". For example, if you query for interactable on a union type of `Student | Prospect` and request `full_name` you may get back this error.
This is due to the fields having different type definitions. In order to get around this you will need to define an alias for the field you are querying.
For example, you can query for `student_full_name: full_name` and `prospect_full_name: full_name` to get back the data you are looking for.
servers:
- url: ${APP_URL}/graphql
Expand Down

0 comments on commit 4d2f59d

Please sign in to comment.