I have the following query:
""" query Odds($id: ID!) {
odds(id: $id) {
oddsMarkets {
oddsOptions {
... on OddsToWin {
odds
}
... on OddsFinishes {
odds
}
... on OddsCutsPlayers {
odds
}
... on OddsLeadersPlayers {
odds
}
}
}
}
}
"""
I was wondering if its possible to return all the desired values even if they are non-existent (return them as None
). At the moment I am getting the following dictionary returned:
{
'odds': {
'oddsMarkets': [
{
'oddsOptions': [
{
'odds': '+1200'
}
]
}
]
}
}
As you can see +1200
is located in a list. By doing research I know that this value corresponds to OddsToWin
. But if I don’t know this in advance, how do I know if odds
represents the odds of winning, finishing, cutting or becoming the leader?
Let’s say the server only returns the odds
from OddsLeadersPlayers
. It will also show up
in oddsOptions[0]
right?
Is it possible to retrieve all odds values even if they are null / None or is there another way to make it more clear?