oneOf input types
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- fsharp, graphql
- Domain
- api, backend-api-design
Research direction
Start by reviewing the linked GraphQL oneOf RFC and the existing F# input-object and discriminated-union mapping entry points. Compare the current schema-generation behavior with the Cat, Dog, and Pet examples in the issue. Done means oneOf input types are supported according to the RFC and covered by the project's relevant tests.
Written by the indexing model from the issue text.
Description
Description
The RFC for oneOf input types is nearing completion and is in the phase of gathering feedback from libraries and users
graphql-js and HotChocolate already have implemented this feature based on the RFC.
Repro steps
N/A
Expected behavior
I imagine that an F# discriminated union, like this
type Cat = { Name: string; Meows: bool }
type Dog = { Name: string; Barks: bool }
type Pet =
| DogPet of Dog
| CatPet of Cat
could be mapped to a GraphQL oneOf input type, like this
input Cat {
name: String
meows: Boolean
}
input Dog {
name: String
barks: Boolean
}
input Pet @oneOf {
dogPet: Dog
catPet: Cat
}
Actual behavior
oneOf input type not supported.
Known workarounds
Essentially none.
Related information
N/A
- Dominant language
- F#
- Stars
- 406
- Forks
- 74
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fsprojects/FSharp.Data.GraphQL
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
fsprojects/FSharp.Data.GraphQL#573 · 1 reaction · 2 assignees ·
-
FR: Suave package Open
fsprojects/FSharp.Data.GraphQL#566 · 1 comment · 1 reaction · 2 assignees ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
All issues in fsprojects/FSharp.Data.GraphQL
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100