-
Notifications
You must be signed in to change notification settings - Fork 204
feat(taxonomy): add getConceptAncestors and getConceptDescendants functions [] #2565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lib/types/client.ts
Outdated
| getConceptAncestors( | ||
| id: string, | ||
| query?: ConceptAncestorsDescendantsQueries, | ||
| ): Promise<ConceptCollection<'en-US'>> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
@ethan-ozelius-contentful sorry for the ping again -- the endpoints are now available and I also updated the tests. Would appreciate the review again 🙇🏽 |
|
🎉 This PR is included in version 11.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
client.getConceptAncestors('conceptId', { depth: 2})client.getConceptDescendants('conceptId', { depth: 5 })Description
Motivation and Context
Todos
Screenshots (if appropriate):