Use returned value as variable in same query?


#1

I have a query, and I’m wondering if there’s a way to only return stats from matches that have the same player id as the id returned from players.

const TEAM_QUERY = gql`
  query TEAM_QUERY($name: String!) {
    team(where: { name: $name }) {'
      id
      name
      players {
        id
        summonerName
        matches {
          id
          duration
          stats {
            player {
              id
            }
            damage
            gold
          }
        }
      }
    }
  }

#2

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.