WPGraphQL Query by URI returns null on custom post type

728 views Asked by At

I have a custom post-type that I am trying to query by URI, my query looks like this but doesn't work:

query {
  article(id:"/category/child-category/article-name/", idType:URI) {
    slug,
    uri
  }
}

If I do the same using the DATABASE_ID to verify the article URI, it works just fine:

query  {
  article(id:4843175, idType: DATABASE_ID) {
    slug,
    uri
  }
}
1

There are 1 answers

0
huge-iguana On

this bug has been addressed in v0.12.3 https://github.com/wp-graphql/wp-graphql/releases/tag/v0.12.3