Skip to content

Instantly share code, notes, and snippets.

@mhallin
Created July 27, 2018 06:44
Show Gist options
  • Save mhallin/37dce52078217b1de8e89977ff450f9d to your computer and use it in GitHub Desktop.
Save mhallin/37dce52078217b1de8e89977ff450f9d to your computer and use it in GitHub Desktop.
module Query1 = [%graphql
{|
query {
someFieldWithInterfaceType {
id
...on ImplA {
a_only
}
...on ImplB {
b_only
}
}
}
|}
]
module FragA = [%graphql
{|
fragment on ImplA {
a_only
}
|}]
(* This should _ideally_ have the same type as Query1 *)
module Query2 = [%graphql
{|
query {
someFieldWithInterfaceType {
id
...on ImplA {
...FragA
}
...on ImplB {
b_only
}
}
}
|}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment