eritikass / express-graphiql-middleware

express-graphiql-middleware
1 stars 0 forks source link

Can't import #1

Open eric-burel opened 5 years ago

eric-burel commented 5 years ago

Hi, thanks for this package, however I can't import it.

import expressGraphiqlMiddleware from 'express-graphiql-middleware';

will return {}. I am using Meteor but it should not be relevant.

eritikass commented 5 years ago

you are using it in meteor server side code?

eric-burel commented 5 years ago

Yep, I've ended up copy pasting your code + Apollo 1.4. By the way I am not sure your imports are still valid, you may need to copy paste a few file from apollo 1.4.

Here is the code I ended up writing: https://github.com/VulcanJS/Vulcan/blob/c81f58a91c63d39d7802359d7b2439a4907784d4/packages/vulcan-lib/lib/server/apollo-server/graphiql.js

To be precise it is only loaded server side, so there should be no issues with client side imports.