- Issue created by @Ki
-
almunnings β
committed 6552d4c3 on 2.0.x
Issue #3364017: Expose parent term id for Taxonomy Term schema
-
almunnings β
committed 6552d4c3 on 2.0.x
- π¦πΊAustralia almunnings Melbourne, π¦πΊ
Yep good call
I've exposed parent on the term entity as a recursive reference.
Have a play on dev.
- Assigned to almunnings
- Status changed to Needs review
over 1 year ago 5:49am 1 June 2023 - π¦πΊAustralia almunnings Melbourne, π¦πΊ
Hmm,
I spot a problem.If we have multiple taxonomy term types allowed on a field, the queries start to get overly complicated.
{ nodePages(first:10) { nodes { tags { ... on TermInterface { __typename name } ... on TermA { parent { id } } ... on TermB { parent { id } } // and so on } } } }
VS if I just return a union on the parent and add parent to the interface...
{ nodePages(first:10) { nodes { tags { ... on TermInterface { __typename name parent { ... on TermInterface { id } } } } } } }
So I might just do the dirty on this and return a Union
-
almunnings β
committed 52a508a6 on 2.0.x
Issue #3364017 by almunnings: Expose parent term id for Taxonomy Term...
-
almunnings β
committed 52a508a6 on 2.0.x
- πΊπΈUnited States Ki
@almunnings,
Thanks for the quick response! It works great.
I think it's fine to limit parents from the same vocabulary only. Drupal core UI does not allow multi-vocab parents anyway.Ki
- Status changed to RTBC
over 1 year ago 12:38pm 1 June 2023 - Status changed to Fixed
over 1 year ago 7:31am 19 June 2023 - Status changed to Fixed
over 1 year ago 7:32am 19 June 2023