Below is a query which is conceptually what I'm looking for. But, I cannot figure out how to implement... or even if it's possible.
query getMedia($id: ID!) {
media(id: $id) {
__typename
title
... on Movie {
fps
}
... on Music {
duration
... on Song {
lyrics
}
... on Composition {
movements
}
}
}
Basically, I have types of Media, if it's Music, there are different types of music. If the record is a "Song", I would expect this as a response:
{
"media": {
"__typename": "Song",
"duration": 5.67,
"title": "Some Song",
"lyrics": "La de da de da de da de day oh",
}
}
Is this possible?