maartenvanvliet.nl

Creating an Input Union Type System Directive in Absinthe (opens in new tab)

From Maarten van Vliet: In this post I will explain how to create a type system directive in Absinthe to implement Input Unions in Graphql. The code for this post can be found on Github A common issue with GraphQL is the lack of input unions. This means an input object that lets you choose between a number of potential input types. For example (taken from a spec discussion): input PetInput { cat: CatInput dog: DogInput fish: FishInput } input CatInput { name: String!

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help