Skip to content

Conversation

@luizfonseca
Copy link
Member

Summary

  • adds client.getConceptAncestors('conceptId', { depth: 2})
  • adds client.getConceptDescendants('conceptId', { depth: 5 })

Description

Motivation and Context

Todos

  • Implemented feature
  • Feature with pending implementation

Screenshots (if appropriate):

@luizfonseca luizfonseca requested a review from a team as a code owner September 18, 2025 13:24
getConceptAncestors(
id: string,
query?: ConceptAncestorsDescendantsQueries,
): Promise<ConceptCollection<'en-US'>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking question: why hard-code to en-US, I can see that other taxonomy methods also return a en-US type, but is there some more context? Are all taxonomy features hard-coded to en-US at the moment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question -- when Taxonomy started only en-US was available, but nowadays customers can actually get their concepts in different languages.

For these new methods it might be useful to use Locale code instead here. Good point.

@luizfonseca
Copy link
Member Author

@ethan-ozelius-contentful sorry for the ping again -- the endpoints are now available and I also updated the tests.

Would appreciate the review again 🙇🏽

@luizfonseca luizfonseca merged commit 5d2a265 into master Sep 26, 2025
7 checks passed
@luizfonseca luizfonseca deleted the feat/taxonomy-ancestors-descendants branch September 26, 2025 16:06
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 11.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants