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

Add documentation for GraphQL Union field bug #397

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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