gatsbyjs/gatsby-source-wordpress-experimental

Query Page template

Closed this issue · 1 comments

Whats's is going wrong to query page?

query ($id: String!,  
  $parent: Int, 
  $wpId: Int) {
  currentPage: wpPage(id: {eq: $id}) {
    title
    content
    featuredImage {
      node {
        altText
        localFile {
          childImageSharp {
            fluid(maxWidth: 1000, quality: 100) {
              ...GatsbyImageSharpFluid_withWebp
            }
          }
        }
      }
    }
  }
  parentChildren: allWpPage(filter: {wpParent: {eq: $parent}}) {
    edges {
      node {
        id
        title
        link
      }
    }
  }
  children: allWpPage(filter: {wpParent: {eq: $wpId}}) {
    edges {
      node {
        id
        title
        link
      }
    }
  }
  parent: wpPage(id: {eq: $parent}) {
    title
    link
  }
}

Hi @rcapdepaula , can you elaborate a bit? Ideally we need a full description of what the problem you're experiencing is as well as a minimal reproduction of the problem and access to a public /graphql url.

Thanks!