This is more a question than a bug.
How to handle default category for a post, since graphql returns a empty array for the node categories but WordPress does provide a default category when none specified ?
I feel this is the intended behavior of wp-graphql, so I was thinking fetching the default category in a query and put the logic in my front-end code. Is that the best way to do this ?
How could I query the default category from wordpress ? At first querying the category with the id 1 was my guess, but the default category can be changed.
Any tips are very welcome.
This is more a question than a bug.
How to handle default category for a post, since graphql returns a empty array for the node categories but WordPress does provide a default category when none specified ?
I feel this is the intended behavior of wp-graphql, so I was thinking fetching the default category in a query and put the logic in my front-end code. Is that the best way to do this ?
How could I query the default category from wordpress ? At first querying the category with the id 1 was my guess, but the default category can be changed.
Any tips are very welcome.