You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to import a file with .gql.ts extension, you would omit the .ts part in the import statement.
Since the plugin looks at importPath rather than the name of the actual file, it will handle it and import it as graphql, which will fail (assuming it is a ts file).
Attaching a patch that would fix it, but of course not sure if this has other implications.
@nielsmadan
I couldn't realize the use of those files with GraphQL syntax but added .ts extension.
The original extension is important to retain. If you change it to TypeScript syntax you'll need a parser, but GraphQL has this parser natively or with a package.
A granulated code with the GraphQL code separated fits better and you separate codes from different syntax brings more readability for developing.
In order to import a file with .gql.ts extension, you would omit the
.ts
part in the import statement.Since the plugin looks at
importPath
rather than the name of the actual file, it will handle it and import it as graphql, which will fail (assuming it is a ts file).Attaching a patch that would fix it, but of course not sure if this has other implications.
babel-plugin-import-graphql+2.8.1.patch.txt
The text was updated successfully, but these errors were encountered: