Is it possible to find all records where a certain model or block is used?
When making changes to the rendering of some model or block I want to be able to find examples of where it is used to avoid I’m breaking anything.
Right now I use this workflow which is kind of cumbersome:
Run a script I’ve written that downloads all content via the Content Management API
Use ag to search all content for the ID of the model/block
Use jq to extract the .attributes.slug to be able to visit the page where the block is used
I know of the Used in X fields dropdown in the admin UI but that doesn’t help me if the block is used in a BlogPage but I don’t know which BlogPage it is…
Is that kinda what you mean, or am I misunderstanding?
Hmm… if you’re trying to find “records that contain block of type myBlock”, you can turn on GraphQL Deep Filtering for the field that contains the block (a MCF or structured text, usually) and do a query like: