graphql-codegen-vscode
graphql-codegen-vscode copied to clipboard
Doesn't work for exported tagged template literal `gql`
I cannot make this work for files that create the graphql query with the gql tagged template literal and export them. It works with files that are just the query/mutation definition, but I want to export it with typescript and use it like so:
import { gql } from "graphql-request";
export const RegisterMutation = gql`
mutation Mutation($profile: ProfileInput!) {
register(profile: $profile) {
ok
}
}
`;
I tried the following configuration
"graphql-codegen.fileExtensionsDeclaringGraphQLDocuments": [
"graphql",
"gql",
"ts"
],
"graphql-codegen.filePathToWatch": "app/gql"