Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support NodeJS ES Modules #1066

Open
dandv opened this issue Apr 12, 2020 · 2 comments
Open

Support NodeJS ES Modules #1066

dandv opened this issue Apr 12, 2020 · 2 comments

Comments

@dandv
Copy link
Contributor

dandv commented Apr 12, 2020

I'm trying to use named imports from .mjs files now that modules are no longer experimental and running into the same issue that graphql-tools had:

gm.mjs

import { GraphQLModule } from '@graphql-modules/core';
$ node gm.mjs 
(node:27782) ExperimentalWarning: The ESM module loader is experimental.
file:///home/dandv/gm.mjs:1
import { GraphQLModule } from '@graphql-modules/core';
         ^^^^^^^^^^^^^
SyntaxError: The requested module '@graphql-modules/core' does not provide an export named 'GraphQLModule'
@ardatan ardatan changed the title Support ES Modules Support NodeJS ES Modules Apr 12, 2020
@ardatan
Copy link
Collaborator

ardatan commented Apr 12, 2020

Currently we don't have Node's ESM support in GraphQL Modules. But we are working on it together with all other libraries we maintain.

@Urigo
Copy link
Owner

Urigo commented Apr 22, 2020

@dandv if you want to help push this forward quicker, the best place to start is making graphql.js compatible with it.
Here is a start: graphql/graphql-js#2487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants