How to skip to certain variables on a nested query

Hi, I’m a new developer, and I’m planning to get all the nearby routes from a specific location. So, this is my query:

query nearbyRoutes($lat: Float!, $lon: Float!) {
    stopsByRadius(lat: $lat, lon: $lon, radius: 500){
        edges {
            node {
                stop {
                    routes {
                        longName
                        gtfsId
                    }
                }
            }
        }
    }
}

When I console log my data, I have to go through numerous data types before I get to the route name, how do I just skip to that? I am using javascript. Thanks.

Hi @ace_domingo :wave: if you’re asking about Apollo Client specifically, unfortunately there’s nothing out of the box that can change the response from your server. If there’s a different field on your server’s GraphQL schema that provides the same data but without having to drill down so deeply, that might be worth looking into. Otherwise you’ll need to contend with the data that the server returns. Best of luck!