So it might sound weird, but I don't really need any fields. For example, if I want a divider between two sections, I would have a Divider (<hr />) slice and that would be added between two slices. My Games Section slice is basically a placeholder.
Ok, I see. Your query needs to look for all fields in a slice in the given Custom type.
For example, in this GraphQuery, I'm querying for documents of the type blog that have a Content Relationship field with the API ID of example_content_relationship with a linked document of the type post that has a Slice with the name of example_divider_slice
@Pau Is this something that can be looked into? I'm currently working on a project that needs this capability to fetch empty slices, but errors are thrown when I try to fetch the slice.
It's a private project, but I can send you a zip file if that's possible. Another option is to create a repro, but it will take some time. Let me know which way you prefer .
Hi @iwatakeshi. Were you able to get this resolved with @Pau? She's off currently, so I'm taking this over. But I am unable to see any private messages between you two, so I'm not sure what the status is here.
So I did remove the spaces as suggested, but it still gives me an error .
I think it does have something to do with the formatting. I'll look into it further. My guess is that the backend doesn't like the extra spaces and new lines. I wished there was a tool that made writing queries easier. Also, maybe a better debugging experience would be nice . I'll let you guys know if I figure something out.
@iwatakeshi I tried it with your project code and got it to work. The issue is that it didn't like you putting the entire field on one line. I got it to work by moving ...non-repeatFields and ...repeatFields to their own lines: