Friday, July 1, 2022
HomeWordPress DevelopmentGraphql Question: Unable to show posts ,after modifying any class/ subcategory in...

Graphql Question: Unable to show posts ,after modifying any class/ subcategory in wordpress – WPGRAPHQL Plugin


In one among our web sites we’re utilizing WPGRAPHQL (https://www.wpgraphql.com/) plugin to fetch posts and show them within the third get together website. In regular circumstances, that is working high-quality. Whereas modifying any class/ subcategory within the father or mother web site, the posts beneath the modified class/ subcategory are usually not getting utilizing Graphql question. These posts can be found within the graphql responses, provided that we delete that individual class/ subcategory and re-create it.

The question we’re utilizing is:

{
  posts(the place: {categoryId: 954}, first: 1000) { 
    nodes {
      id
      title
      date
      dateGmt
      standing
      uri
      hyperlink
      modified
      modifiedGmt
      featuredImage {
        node {
          fileSize
          uri
          sourceUrl
          mimeType
          mediaType
          id
          altText
          date
          dateGmt
          modified
          modifiedGmt
          mediaItemUrl
        }
      }
      creator {
        node {
          title
          description
          electronic mail
          lastName
          firstName
          id
          avatar(dimension: 600) {
            url
            width
            top
          }
        }
      }
      classes {
        nodes {
          title
        }
      }
      tags {
        nodes {
          id
          title
        }
      }
      search engine optimisation {
        canonical
        title
        metaDesc
        metaKeywords
        opengraphTitle
        opengraphUrl
        opengraphSiteName
        opengraphPublishedTime
        opengraphModifiedTime
        opengraphDescription
        opengraphAuthor
        opengraphImage {
          altText
          sourceUrl
          srcSet
        }
        twitterTitle
        twitterDescription
        twitterImage {
          altText
          sourceUrl
          srcSet
        }
      }
    }
  }
}

In one among our web sites we’re utilizing WPGRAPHQL (https://www.wpgraphql.com/) plugin to fetch posts and show them within the third get together website. In regular circumstances, that is working high-quality. Whereas modifying any class/ subcategory within the father or mother web site, the posts beneath the modified class/ subcategory are usually not getting utilizing Graphql question. These posts can be found within the graphql responses, provided that we delete that individual class/ subcategory and re-create it.

The question we’re utilizing is:

{
posts(the place: {categoryId: 954}, first: 1000) {
nodes {
id
title
date
dateGmt
standing
uri
hyperlink
modified
modifiedGmt
featuredImage {
node {
fileSize
uri
sourceUrl
mimeType
mediaType
id
altText
date
dateGmt
modified
modifiedGmt
mediaItemUrl
}
}
creator {
node {
title
description
electronic mail
lastName
firstName
id
avatar(dimension: 600) {
url
width
top
}
}
}
classes {
nodes {
title
}
}
tags {
nodes {
id
title
}
}
search engine optimisation {
canonical
title
metaDesc
metaKeywords
opengraphTitle
opengraphUrl
opengraphSiteName
opengraphPublishedTime
opengraphModifiedTime
opengraphDescription
opengraphAuthor
opengraphImage {
altText
sourceUrl
srcSet
}
twitterTitle
twitterDescription
twitterImage {
altText
sourceUrl
srcSet
}
}
}
}
}

Any answer for this situation is far appreciated. Thanking you upfront.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments