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 support for lists with no fields in GraphQL #9254

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Add support for lists with no fields in GraphQL #9254

merged 6 commits into from
Aug 6, 2024

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Aug 5, 2024

This pull request addresses the issue where lists in GraphQL may have no fields that should be publicly described in the GraphQL.

This scenario can come up for lists with items that completely derive their content from other sources, and thus no fields need be exposed; but you may still want to support users to create items in these lists.

Previously, developers worked around this problem with custom mutations or by retaining at least one field, relevant or not. This pull request eliminates the need for these workarounds by adding support using an empty object GraphQL scalar.

This comment was marked as resolved.

@dcousens dcousens force-pushed the empty-lists branch 7 times, most recently from ba20efc to d7fe8a3 Compare August 5, 2024 07:23
@dcousens dcousens self-assigned this Aug 5, 2024
@dcousens dcousens force-pushed the empty-lists branch 2 times, most recently from 96ec297 to 8a9b813 Compare August 5, 2024 07:35
@dcousens dcousens merged commit 27207a1 into main Aug 6, 2024
1 check was pending
@dcousens dcousens deleted the empty-lists branch August 6, 2024 02:10
@dcousens dcousens mentioned this pull request Aug 9, 2024
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

Successfully merging this pull request may close these issues.

1 participant