Validation error of type FieldUndefined: Field 'XXX' in type 'QueryType' is undefined, when saving GraphQL query in AEM

Viewed 162

I am trying to save a persisted query in AEM's GraphiQL Explorer.

I can run the query fine, as seen on the right side.

enter image description here

But if I try "Save As", I get the following error. "Validation error of type FieldUndefined: Field 'adventureList' in type 'QueryType' is undefined"

enter image description here

I also tried named query, but no avail.

query getAdventures {
  adventureList {
     items {
       _path
       adventureTitle
       adventurePrice
       adventureTripLength
       adventurePrimaryImage {
         ... on ImageRef {
           _path
           mimeType
           width
           height
         }
       }
     }
  }
}

Why is it giving me such an error during saving, when I can execute the query fine, and what would be the correct syntax?

Any help is much appreciated.

0 Answers
Related