Comments (12)
@robincsamuel hello, looks like apollo-server-express doesn't support express 5 (and it's still in alpha btw) so i'm closing this for now
from bull-monitor.
I tried to debug the issue and figured out the root cause. It works fine if I pass bodyParserConfig: false
to the applyMiddleware
method (source). However, I don't see a way to pass this config via bull monitor.
@s-r-x Any idea?
from bull-monitor.
It's currently in beta, fyi :)
from bull-monitor.
that's cool
from bull-monitor.
Adding a middleware like this fixes the issue since body-parser checks for req._body to see if it's already parsed and skips parsing in that case.
router.post('/queues/graphql', (req, res, next) => {
req['_body'] = true;
return next();
});
I think it'd be great if we can pass the Apollo Server/applyMiddleware options via bull monitor configuration. I'd be happy to raise a PR if you think that's a good idea :)
from bull-monitor.
@robincsamuel n1. I think we can add some config to the init method with something like express5: boolean, and tweak bodyparserconfig based on that. wdyt?
from bull-monitor.
Yeah, that'd work. But I think accepting the apollo server's acceptMiddleware
options would be a more robust solution. Because that'd probably be helpful in many other cases where someone can pass in a custom body parser configuration or even cors configuration.
from bull-monitor.
I don't want to let the library users to deal with any internal dependency (like apollo server) directly, so let's stick with some abstraction for now
from bull-monitor.
Okay, that makes sense. What about passing a more generic option like disableBodyParser
and disableCors
? I think a flag based on the express version may become irrelevant in the future or will end up adding more flags.
Or maybe, we can detect the express version and handle this without a flag.
from bull-monitor.
sounds good
from bull-monitor.
so, which method do you think is the best? disableBodyParser
flag or detect the express version and handle based on that?
from bull-monitor.
both are fine, do whatever you think fits the best
from bull-monitor.
Related Issues (20)
- Error getting Redis info from Redis cloud database HOT 5
- handle metrics collector errors
- User authentication needed to access UI page HOT 1
- Redis ACL HOT 1
- search with all status HOT 1
- Repeatable jobs do not work properly HOT 1
- Apollo cache configuration HOT 3
- Error while trying to remove job HOT 1
- Support Fastify v4
- GraphQLError: Enum "JobStatus" cannot represent value: "unknown" HOT 1
- Update Deprecated Apollo Server Dependencies HOT 2
- support querying prioritized JobStatus HOT 4
- Stop metrics collector when app's shutting down HOT 5
- Support view return data though done(error, data); HOT 1
- Support Redis Cluster for BullMQ HOT 3
- Bullmq flows implementations
- jsonata search is not working for `waiting` status
- Unable serve bull monitor with http.createServer HOT 4
- BullMQ update job data fails
- Problems testing all bull-monitor packages together HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bull-monitor.