A GraphQL OneOf input object expresses a choice among several alternatives in the schema. For example, a lookup may accept either an ID or a username; sending both or neither is invalid. The chosen field must also be non-null.
The demo passes an ID-only input and rejects a pair of ID and username. The schema fields are nullable types, while a valid submitted object must contain exactly one non-null value.
When to use
Use it when one argument must choose among mutually exclusive lookup or search keys.