Imagine that I have a following query (I am using Apollo):
const userQuery = gql`
query {
user {
id
name
}
}
`;
I want to fetch name field only if some condition is met (let's say variable shouldFetchName is true). How should I approach this and what is the best practice?