0

I am trying to edit one of Custom Post Types Ranking so that the upvotes field inside Ranking > ranking > rankingsPost > upvotes = 1. I cannot seem to do this with a mutation in wp-graphql.

mutation MyMutation {
  __typename
  updateRanking(input: {clientMutationId: "UpdateRanking", id: "cmFua2luZzo4NjI=", title: "Jamie"}) {
    ranking {
      rankingsPost {
        upvotes
      }
    }
  }
}

However this is not an option with graphQL it appears. As you can see, the upvotes is nested inside the Ranking custom post type.

enter image description here

Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291

0 Answers0