I have this GraphQL query in a TypeScript file:
const someVar = 'getUser'
export const SOME_QUERY = gql`
query ${someVar} {
user {
name
}
}
`
but when I run graphql-codegen
to generate the types, I get this message in the terminal:
[client-preset] the following anonymous operation is skipped:
query {
user {
name
}
}
Looks like the template string is not being picked up.