Want to execute query when variable changes

I am fetching an id token using auth0 react SDK which returns a promise and then it gets resolved. At the same time, I m using an apollo use query to fetch data but the query also requires that token to return data. How to run the query only after the token is return by auth0?