Skip to content

Instantly share code, notes, and snippets.

@Huxpro
Last active July 26, 2018 23:39
Show Gist options
  • Select an option

  • Save Huxpro/2b1064866552a0573cd863120c070fb2 to your computer and use it in GitHub Desktop.

Select an option

Save Huxpro/2b1064866552a0573cd863120c070fb2 to your computer and use it in GitHub Desktop.
module Query = [%graphql
{|
query {
someFieldWithInterfaceType {
id
...on ImplA {
a_only
}
...on ImplB {
b_only
}
}
}
|}
]
/* generated */
module Query = {
type t = {.
"someFieldWithInterfaceType": [
| `ImplA ({. "id":string, "a_only": blah})
| `ImplB ({. "id":string, "b_only": blah})
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment