Help | "ParsingError: Unable to parse fetch query Invalid fetch parsing Exception"

Hi Guys / @Phil, can you tell me why this is not working? I need to get the linked document [content relationship] under the slice's repeat field using Slice Machine.

We're planning to move to the test version of our project by the end of this week so a quick solution would be appreciated.

Query:

{
  homepage{
    slices {
      ...on blogs {
        variation {
          ...on default {
            primary {
              ...primaryFields
            }

            item { // how do I get repeat fields?
              ...on blog {
                title
              }
            }
          }
        }
      }
    }
  }
}

Hey Rehan,

I believe you need to define the link API ID before ...on blog

Okay so the API is giving an incorrect error message and also there's no documentation relating to the key required for the repeat fields. I think that creates confusion and negatively impacts your time and development workflow.

Here's a query that works:

{
  homepage{
    slices {
      ...on blogs {
        variation {
          ...on default {
            items {
              blog {
                ...on blog {
                  ...blogFields
                }
              }
            }
          }
        }
      }
    }
  }
}
1 Like

I understand and agree. The docs should be updated very soon.

We have released a new version of the GraphQuery document. Now it has support for Slice Machine.

Please let us know if you have questions, comments, or suggestions.
Cheers!

1 Like