Interfaces and Unions
GraphQL Unions
Here's how you can use Zeus with GraphQL Unions:
const { drawChangeCard } = await chain('query')({
drawChangeCard: {
__typename: true,
'...on EffectCard': {
effectSize: true,
name: true,
},
'...on SpecialCard': {
effect: true,
name: true,
},
},
});and here's the response:
{
"effectSize": 195.99532210956377,
"name": "Destinee",
"__typename": "EffectCard"
}GraphQL Interfaces
Zeus also works with GraphQL Interfaces
and the response:
Last updated
Was this helpful?