---
title: "Discussion on \"GraphQL @oneOf: Exactly One Input, Enforced by the Schema\" | Hashnode"
description: "Discussion on \"GraphQL @oneOf: Exactly One Input, Enforced by the Schema\". Every GraphQL schema I've worked on eventually grows a field that can be looked up more than one way. You want a user by ID, or by email, or by username. The type system has no way to say \"exactly one"
url: "https://hashnode.com/posts/graphql-oneof-exactly-one-input-enforced-by-the-schema/6aa7c7e94beab7f912a6a562"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [GraphQL @oneOf: Exactly One Input, Enforced by the Schema](https://grimicorn.hashnode.dev/graphql-oneof-exactly-one-input-enforced-by-the-schema?utm_source=hashnode&utm_medium=feed)

Every GraphQL schema I've worked on eventually grows a field that can be looked up more than one way. You want a user by ID, or by email, or by username. The type system has no way to say "exactly one

Sep 14 · 4 min read · grimicorn.hashnode.dev  
Read the article

-   [#graphql](https://hashnode.com/tag/graphql)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#web-apis](https://hashnode.com/tag/web-apis)
-   [#tooling](https://hashnode.com/tag/tooling)

## Written by

[Dan Holloran](https://hashnode.com/@grimicorn)

@grimicorn · St. Louis, MO

  
[View profile](https://hashnode.com/@grimicorn)

Full-stack web developer since 2012 · Vue · React · Laravel · danholloran.me

Senior Full Stack Developer with 14+ years building performant, scalable web applications. Passionate about architecture, mentorship, and finding the right tool for the job.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
