Skip to content

Commit

Permalink
Fixing select
Browse files Browse the repository at this point in the history
Making select match v2 and v3 versions of this call.
  • Loading branch information
bcameron1231 committed Aug 8, 2024
1 parent d3a6c0e commit 85242d0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/graph/taxonomy/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@ export class _TermSet extends _GraphInstance<ITermStoreType.Set> {
*
* @returns Array of children for this item
*/
public async getAllChildrenAsTree(): Promise<IOrderedTermInfo[]> {
public async getAllChildrenAsTree(props?:{retrieveProperties?:boolean}): Promise<IOrderedTermInfo[]> {

Check failure on line 80 in packages/graph/taxonomy/types.ts

View workflow job for this annotation

GitHub Actions / run_pr_tests

Expected a space after the '?:'

Check failure on line 80 in packages/graph/taxonomy/types.ts

View workflow job for this annotation

GitHub Actions / run_pr_tests

Expected a space after the '?:'

Check failure on line 81 in packages/graph/taxonomy/types.ts

View workflow job for this annotation

GitHub Actions / run_pr_tests

Trailing spaces not allowed
let selects = ["*"];
if(props?.retrieveProperties){
// graph does not let us wildcard + select properties
selects=["id", "labels", "createdDateTime", "lastModifiedDateTime", "labels", "descriptions", "properties"];
}

const visitor = async (source: ITerm | ITermSet, parent: IOrderedTermInfo[]) => {

const children = await source.children.select('id', 'descriptions', 'createdDateTime','labels', 'lastModifiedDateTime')();
const children = await source.children.select(...selects)();

Check failure on line 90 in packages/graph/taxonomy/types.ts

View workflow job for this annotation

GitHub Actions / run_pr_tests

Trailing spaces not allowed
for (let i = 0; i < children.length; i++) {

Check failure on line 92 in packages/graph/taxonomy/types.ts

View workflow job for this annotation

GitHub Actions / run_pr_tests

Trailing spaces not allowed
Expand Down

0 comments on commit 85242d0

Please sign in to comment.