Skip to content

Commit 4894884

Browse files
binaryseedIvanGoncharov
authored andcommitted
Reference a handful of use cases (#619)
1 parent 849d124 commit 4894884

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

rfcs/InputUnion.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,26 @@ A wide variety of solutions have been explored by the community, and they are ou
139139

140140
## Use Cases
141141

142-
TODO:
143-
* [ ] Collect use cases from the community's related Issues / PRs.
142+
There have been a variety of use cases described by users asking for an abstract input type.
143+
144+
* [Observability Metrics](https://github.com/graphql/graphql-spec/pull/395#issuecomment-489495267)
145+
* [Login Options](https://github.com/graphql/graphql-js/issues/207#issuecomment-228543259)
146+
* [Abstract Syntax Tree](https://github.com/graphql/graphql-spec/pull/395#issuecomment-489611199)
147+
* [Content Widgets](https://github.com/graphql/graphql-js/issues/207#issuecomment-308344371)
148+
* [Filtering](https://github.com/graphql/graphql-spec/issues/202#issue-170560819)
149+
* [Observability Cloud Integrations](https://gist.github.com/binaryseed/f2dd63d1a1406124be70c17e2e796891#cloud-integrations)
150+
* [Observability Dashboards](https://gist.github.com/binaryseed/f2dd63d1a1406124be70c17e2e796891#dashboards)
144151

145152
## Possible Solutions
146153

147-
Categories:
154+
Broadly speaking, there are two categories of solutions to the problem of type discrimination:
148155

149156
* Value-based discriminator field
150157
* Structural discrimination
151158

152159
### Value-based discriminator field
153160

154-
These options rely the **value** of a specific input field to express the concrete type.
161+
These solutions rely the **value** of a specific input field to determine the concrete type.
155162

156163
#### Single `__typename` field; value is the `type`
157164

@@ -284,7 +291,7 @@ input AddImageInput {
284291

285292
### Structural discrimination
286293

287-
These options rely on the **structure** of the input to determine the concrete type.
294+
These solutions rely on the **structure** of the input to determine the concrete type.
288295

289296
#### Order based type matching
290297

0 commit comments

Comments
 (0)