graphql-request
graphql-request copied to clipboard
"Exports is not defined" error in version >= 3
Hi,
I have a exports is not defined error when importing from graphql-request in version higher than 3. I'm now using version 2.0.0 to make it work. My project is compiled using Webpack and served on the browser.
I had a similar problem when using @graphql-codegen/typescript-graphql-request because the generated code tried to import the types with import * ... instead of import type * ...
Adding to useTypeImports: true to my graphql.config.yml solved the problem for me.