ashhitch / wp-graphql-yoast-seo

This is an extension to the WPGraphQL plugin for Yoast SEO
GNU General Public License v3.0
225 stars 48 forks source link

Can't see yoast "isPrimary" edge for post categories. #140

Closed AndrzejBaran closed 2 years ago

AndrzejBaran commented 2 years ago

Using Gatsby.JS with GraphQL. I can see all nodes for seo, but edges are not showing, so I can't grab isPrimary. My query looks like this:

query getPost {
  wpPost(databaseId: {eq: 12}) {
    categories {
      edges {
        isPrimary
      }
      nodes {
        link
        name
      }
    }
    content
    author {
      node {
        email
        name
        uri
      }
    }
    seo {
      title
    }
  }
}

This gives me an error "Cannot query field \"edges\" on type \"WpPostToCategoryConnection\". Did you mean \"nodes\"?". If I remove edges it works. Seo also gives corrrect values, but not edges.

ashhitch commented 2 years ago

@AndrzejBaran unfortunately Gatsby does not support edge fields