Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for exported tagged template literal gql #10

Open
uloco opened this issue Nov 30, 2021 · 0 comments
Open

Doesn't work for exported tagged template literal gql #10

uloco opened this issue Nov 30, 2021 · 0 comments

Comments

@uloco
Copy link

uloco commented Nov 30, 2021

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"
@uloco uloco changed the title Doesn't work for exported tagged template literal gql... Doesn't work for exported tagged template literal gql Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant