I'm too experiencing issues with fragments and query size in apollo graphql and Prismic. A solution to mitigate this is to create the option to query individual slices (e.g by adding the slice id in body_type)
I'm needing to find out of certain slices are still in use on a large repository, and as far as I can tell, there is no way to filter or identify if there are instances of a given slice, how many, what document they are on, etc.
Is there a way to do this? If not, can it please be added?
Unfortunately this isn't something that possible at the moment, but we are tracking it as an open feature request here.
I think this would be a nice addition, although it's not something that we are working on at the moment. I've added a tick to our feature request tracker for your use case. If/when there is any change to the status of this feature the team will update everyone here.
For your use case, the only way to figure out what slices are in which documents would be to query all you documents and run some filter on the frontend, if not with Gatsby then maybe with something like postman: