Comments (6)
We don’t want multiple queries to mongodb when we can do a single one.
from chat-it-app.
The problem will be present because when you want for example a post with comments inside, you will make a query for each post, and we don’t want that, that will happen in Mongo, Postgresql, any DB... There is dataloader because we don’t want to make a lot of mongo queries, just make a single one and gather all the data we need.
from chat-it-app.
We don’t want multiple queries to mongodb when we can do a single one.
Just to clarify, is it the fact that graphql is causing the "n+1" problem even though the db is mongodb. However, some say mongodb won't have "n+1" problem, what's the point for that?
Thanks
Can you link the people that say that? Maybe they do another method for batching inside the same request , but the way that it works without dataloader is that it will call the resolvers and make a lot of database lookups.
from chat-it-app.
We don’t want multiple queries to mongodb when we can do a single one.
Just to clarify, is it the fact that graphql is causing the "n+1" problem even though the db is mongodb. However, some say mongodb won't have "n+1" problem, what's the point for that?
ThanksCan you link the people that say that? Maybe they do another method for batching inside the same request , but the way that it works without dataloader is that it will call the resolvers and make a lot of database lookups.
I'm thrilled by your reply.
I asked a similar question on stackoverflow and got downvotes.
And recently got baffled by the relationship between the n+1 thing and nosql.
from chat-it-app.
Basically, if you have a relationship between collections and you wanna add data from another collection you might encounter a n+1 problem when using Graphql and gathering data the way I said before. That usually happens in every db that can have this kind of relationship, but it’s more common to see it in relational ones because they are more effective doing join operations and things like that.
from chat-it-app.
Basically, if you have a relationship between collections and you wanna add data from another collection you might encounter a n+1 problem when using Graphql and gathering data the way I said before. That usually happens in every db that can have this kind of relationship, but it’s more common to see it in relational ones because they are more effective doing join operations and things like that.
Thank you so much for your thorough reply indeed.
from chat-it-app.
Related Issues (2)
- gqlgen generate problem HOT 6
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 chat-it-app.