Open tcerda95 opened 5 years ago
Hello!
I have installed the dependency via npm install graphql-directive-auth and in order to use it I must first retrieve the default property from require('graphql-directive-auth') like so:
npm install graphql-directive-auth
default
require('graphql-directive-auth')
const AuthDirective = require('graphql-directive-auth').default;
Which is not how it is specified in the documentation. This does not happen when using the import keyword:
import
import AuthDirectives from 'graphql-directive-auth';
I believe this has something to do with TypeScripts module bundling.
@tcerdaITBA yeah, I think this lib should put "module": "commonjs" to tsconfig.json
"module": "commonjs"
Is this issue fixed in 4979f42defc32a6c0aea7486b908ec24f56a5147?
Hello!
I have installed the dependency via
npm install graphql-directive-auth
and in order to use it I must first retrieve thedefault
property fromrequire('graphql-directive-auth')
like so:Which is not how it is specified in the documentation. This does not happen when using the
import
keyword:I believe this has something to do with TypeScripts module bundling.