openpim / server

Apache License 2.0
58 stars 24 forks source link

Loading a product with all its related data in one query #28

Closed jfayad closed 4 months ago

jfayad commented 4 months ago

According to the doc. and the experiments we could run so far, A user who needs to have all the data related to one item in particular has to run multiple queries (one to get the item, one to get the attributes, one to get the assets etc...)

Initially this defeats the purpose of using a GraphQL api where we should be able to request more data (and increase the complexity of the query) by adding more fields to the query. I'm thus wondering if I missed something in the docs and there's a way to load one or multiple items with all the data belonging to it/them in one query ?

openpim commented 4 months ago

no, it is not possible to load all data by one query. We decided not to provide this ability to avoid performance problems