diff --git a/changelog.md b/changelog.md index fa500d4..54dfadd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # apollo-upload-server changelog +## Next + +* Temporary solution for importing CommonJS in `.mjs`, fixing reopened [#40](https://github.com/jaydenseric/apollo-upload-server/issues/40). + ## 4.0.1 * Correct imports for vanilla Node.js `--experimental-modules` and `.mjs` support, fixing [#40](https://github.com/jaydenseric/apollo-upload-server/issues/40). diff --git a/src/types.mjs b/src/types.mjs index 00dd09f..1b23a6c 100644 --- a/src/types.mjs +++ b/src/types.mjs @@ -1,4 +1,6 @@ -import * as graphql from 'graphql' +import graphqlDefault, * as graphqlExports from 'graphql' + +const graphql = graphqlDefault || graphqlExports export const GraphQLUpload = new graphql.GraphQLScalarType({ name: 'Upload',