Why can't I get title specific data points in Series State?
Article 2972669, Status: VALIDATED
Table of Contents
❓Issue/Question
- I'm trying to access a title specific data point in Series State but it always returns undefined.
- SegmentTeamStateCs2: Field 'winType' in type 'SegmentTeamState' is undefined"
💻Environment/Context
- Series State
👌Resolution/Answer
- To get title specific data points, you need to use the corresponding sub object by using an inline fragment
- Here is are two examples in one query
- Getting
winType
data point using the…on SegmentTeamStateCS2
inline fragment - Getting
alive
andheadshots
data points using the…on GamePlayerStateCS2
inline fragment - As you can see the
name
data point can be used either inside or outside the inline fragment, since it is part of the parent object
- Getting
query SeriesState {
seriesState(id: "28") {
started
finished
valid
games {
id
teams {
name
players {
name
... on GamePlayerStateCs2 {
alive
headshots
}
}
}
segments {
id
teams {
... on SegmentTeamStateCs2 {
name
winType
}
}
}
}
}
}