Bug in GraphQuery API

Hello,

I found a bug in the GraphQuery API. When using it as below to retrieve multiple content relationships I'm getting the error an invalid api response was returned. This doesn't happen when I replace ...secondFields with the name of the first field of the document. It does happen when I also add the name of the second field. The first content relationship is working without any issues. When adding the second one as described I'm getting the error.

Is this a known issue? I would be very happy if this can be solved.

Kind regards,
Sian

...
...on slice name {
          variation {
            ...on default {
              primary {
                ...primaryFields
              }
              items {
                ...itemsFields
              }
            }
            ...on variationName {
              primary {
                ...primaryFields
                first {
                  ...firstFields
                }
                second {
                  ...secondFields
                }
              }
              items {
                ...itemsFields
              }
            }
          }
        }
...

Are first and second the correct API IDs of the content fields inside the non-repeatable zone of your slice?

Yes, when I try both separately there are no issues retrieving the data of the specific content relationship.

I found the issue. My GraphQuery was too long. Because of the fact that I have a couple of content relationships I have to add every created slice to the query which now, causes issues.
Wouldn't it be better if content relationships are automatically linked without the need of adding the GraphQuery?

1 Like

Glad to hear that it worked for you!
I understand that the query syntax can become lengthy if the content query is extensive. At the moment, there are no plans to modify the structure of the schema.

We're always open to hearing from our users and exploring ways to enhance the developer experience. If you have any other questions or need further assistance, please let me know.