Please specify what version of the library you are using: [ 2.0.10 ]
Please specify what version(s) of SharePoint you are targeting: [ SharePoint online ]
import { sp } from '@pnp/sp-commonjs';
const TERMSET_GUID = 'xxxxxxxx-yyyy-zzzz-qqqq-uuuuuuuuuuuu';
...
const terms = await sp.termStore.sets.getById(TERMSET_GUID).children.select('id', 'labels').get();
console.log('loaded %d terms', terms.length);
should return something like "loaded 450 terms" for my flat termset
the code above should return about "loaded 200 terms"
Can you clarify... you have a termset with 200 terms like you mention in the "Steps to Reproduce" or you have a termset with 450 terms like the Expected section? If I'm interpreting your request correctly I think you're saying you have 450 child terms but you're only getting 200 in length, which I would suggest is probably the default returned set size from the endpoint, so you'll probably have to implement the .top option to pull a larger set at one time.
@juliemturner no, I have a flat termset with about 450 terms. So, expected behavior: "loaded 450 terms", observed behavior: "loaded 200 terms"
Thank you for the answer! I will try to use .top a large number, e.g. 100000...
Thank you, It worked!
maximal .top parameter is 5000, if the number is larger the following error comes:
Error making HttpClient request in queryable [400] Bad Request ::> {"error":{"code":"invalidRequest","message":"Invalid page request parameters."}}.
Most helpful comment
Can you clarify... you have a termset with 200 terms like you mention in the "Steps to Reproduce" or you have a termset with 450 terms like the Expected section? If I'm interpreting your request correctly I think you're saying you have 450 child terms but you're only getting 200 in length, which I would suggest is probably the default returned set size from the endpoint, so you'll probably have to implement the .top option to pull a larger set at one time.