message: "Field 'pages' doesn't exist on type 'QueryRoot'",

Nidhi_Savaliya
New Member
1 0 0

when i call graphql api for pages it fives error  message: "Field 'pages' doesn't exist on type 'QueryRoot'",

My query: 

 

  query getPages {
    pages(first: 10) {
      edges {
        cursor
        node {
          title
          id
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
0 Likes
Kevin_A
Shopify Staff
Shopify Staff
293 36 47

Hey @Nidhi_Savaliya 

Are you using admin or storefront API? My understanding is that pages is only available on storefront: https://shopify.dev/docs/storefront-api/reference/online-store/page 

Kevin_A | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes