Home / Companies / Apollo / Blog / Post Details
Content Deep Dive

More expressive schemas with @oneOf

Blog post from Apollo

Post Details
Company
Date Published
Author
Benoit Lubek
Word Count
607
Company Posts That Month
1
Language
English
Hacker News Points
-
Post removed?
No
Summary

The GraphQL community has proposed a new built-in directive called `@oneOf` to improve schema expressiveness, allowing input types to indicate that one and only one of the fields must be provided. This can be applied to input types to provide more precise contract representation, making it easier for clients to query APIs with different criteria. The proposal aims to enhance the GraphQL standard by introducing a new directive that doesn't introduce any new syntax and is backwards compatible with existing client libraries. With this feature, Apollo Kotlin and Apollo Server now support `@oneOf` in their latest versions, allowing developers to try it out and provide feedback on the proposed RFC.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.