Closed ghost closed 3 years ago
graphqlLoaderPlugin.default()
should work
I believe @bennypowers has answer this. Closing.
to be clear, my comment is a workaround. I think this library should use module exports to point to cjs and esm versions
Although this solution works it gives a typescript error
Property 'default' does not exist on type '(options?: GraphQLLoaderPluginOptions) => Plugin'.ts(2339)
This problem is easily fixed properly as Bennypowers describes, and the usage example currently in the README is wrong as the package currently stands (plugins: [graphqlLoaderPlugin()]
instead of plugins: [graphqlLoaderPlugin.default()],
).
This problem is easily fixed properly as Bennypowers describes, and the usage example currently in the README is wrong as the package currently stands (
plugins: [graphqlLoaderPlugin()]
instead ofplugins: [graphqlLoaderPlugin.default()],
).
Yep. I was stumped until I found this issue, because I followed the README instructions.
Trying to use your example but I'm somehow getting this error.