Wp-graphql: Terms in a non-public taxonomy should be considered private

Created on 3 Apr 2019  Â·  3Comments  Â·  Source: wp-graphql/wp-graphql

Part of the model layer, if a term is in a taxonomy with public => false set, the term should be private unless you have the $taxonomy->cap->edit_terms cap.

Architecture Breaking Change Model Layer Needs Discussion Term

Most helpful comment

ya, so you can have the term show_in_graphql and private at the same time.

That would allow for WPGraphQL queries and mutations to read/write to it, but no UI to exist.

¯_(ツ)_/¯

All 3 comments

Let's table this for now. It doesn't look like the REST API does anything to address private taxonomies, and all core does (from what I can tell) is hide the UI altogether for ALL users.

So, to me, private for taxonomy is nullified by show_in_graphql => true

I'll kick it for now, but I do think it's valid. Like if you want to add some terms to a post for internal classification/organization. You might want to expose it in GQL, but not have it be public. It seems like the public flag would be what you want to use in the taxonomy registry to make this happen everywhere.

ya, so you can have the term show_in_graphql and private at the same time.

That would allow for WPGraphQL queries and mutations to read/write to it, but no UI to exist.

¯_(ツ)_/¯

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oleksmir picture oleksmir  Â·  5Comments

nikosolihin picture nikosolihin  Â·  5Comments

TimurGumarov picture TimurGumarov  Â·  5Comments

jasonbahl picture jasonbahl  Â·  4Comments

saulirajala picture saulirajala  Â·  3Comments