You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edited by @derrickmehaffy for the docs team, we need to clean up the docs for fragmets in the entityService + REST population docs to make it a bit more clear on the differences between regular populate vs the on fragmet syntax and explain the differences.
Whenever you start working on this, reach out to me on Slack as I have some suggestions and also just so you know this user is one of our EE customers
Bug report
unable to fetch relation queries for collections with many relations, images, and dynamic zones
Required System information
Node.js version: 16.15.1
NPM version: 8.11.0
Strapi version: 4.5.3
Database: Postgres (12.11)
Operating system: macOS
Describe the bug
whenever I'm trying to make the query for collections that have many sections like dynamic zones, relations, and images, The relation field is not getting populated.
I have used custom middleware generated by strapi generate.
here is the code.
import{Strapi}from'@strapi/strapi';exportdefault(config,{ strapi }: {strapi: Strapi})=>{// Add your own logic here.returnasync(ctx,next)=>{ctx.query.populate={SliderImage: {fields: ['name','caption','alternativeText','url']},ad_audiences: {populate: ['type']},pageBuilder: {},}awaitnext();};};
Hi @harshSinghCondenast I think I understand the issue here as it relates to a new population option we have on dynamic zones (though our documentation does not make this clear/easy to find)
I'm going to transfer this issue over to our docs team to have them adjust the docs to be a bit more clear on how this works compared to just regular populate (we also need to mirror this into the REST population doc too.
derrickmehaffy
changed the title
unable to fetch relation queries for component with many relations, images and dynamic zones
Make dynamic zone fragment documentation more clear
Dec 30, 2022
Edited by @derrickmehaffy for the docs team, we need to clean up the docs for fragmets in the entityService + REST population docs to make it a bit more clear on the differences between regular populate vs the on fragmet syntax and explain the differences.
Whenever you start working on this, reach out to me on Slack as I have some suggestions and also just so you know this user is one of our EE customers
Bug report
unable to fetch relation queries for collections with many relations, images, and dynamic zones
Required System information
Describe the bug
whenever I'm trying to make the query for collections that have many sections like dynamic zones, relations, and images, The relation field is not getting populated.
I have used custom middleware generated by strapi generate.
here is the code.
I have also tried these queries
but this also doesn't worked.
I tried with another example but it worked with the same queries. So really was not able to find the issue.
Steps to reproduce the behavior
Expected behavior
the final JSON should load with all the images, relations, and dynamic zones.
Code snippets
custom middleware code
routes.js for implementation of bug
schema for the brands
Additional context
https://drive.google.com/drive/folders/1EnUwkGcoXRWKqLiMoxX6cmOPizMKP36U?usp=share_link
The text was updated successfully, but these errors were encountered: