pagination loading of subscription and databaseaccounts (#1877)
This commit is contained in:
parent
fe892dcc62
commit
28db549fa1
|
@ -52,11 +52,17 @@ export async function fetchDatabaseAccountsFromGraph(
|
||||||
const body = {
|
const body = {
|
||||||
query: databaseAccountsQuery,
|
query: databaseAccountsQuery,
|
||||||
subscriptions: [subscriptionId],
|
subscriptions: [subscriptionId],
|
||||||
...(skipToken && {
|
...(skipToken
|
||||||
options: {
|
? {
|
||||||
$skipToken: skipToken,
|
options: {
|
||||||
} as QueryRequestOptions,
|
$skipToken: skipToken,
|
||||||
}),
|
} as QueryRequestOptions,
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
options: {
|
||||||
|
$top: 150,
|
||||||
|
} as QueryRequestOptions,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await fetch(managementResourceGraphAPIURL, {
|
const response = await fetch(managementResourceGraphAPIURL, {
|
||||||
|
|
|
@ -51,11 +51,17 @@ export async function fetchSubscriptionsFromGraph(accessToken: string): Promise<
|
||||||
do {
|
do {
|
||||||
const body = {
|
const body = {
|
||||||
query: subscriptionsQuery,
|
query: subscriptionsQuery,
|
||||||
...(skipToken && {
|
...(skipToken
|
||||||
options: {
|
? {
|
||||||
$skipToken: skipToken,
|
options: {
|
||||||
} as QueryRequestOptions,
|
$skipToken: skipToken,
|
||||||
}),
|
} as QueryRequestOptions,
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
options: {
|
||||||
|
$top: 150,
|
||||||
|
} as QueryRequestOptions,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await fetch(managementResourceGraphAPIURL, {
|
const response = await fetch(managementResourceGraphAPIURL, {
|
||||||
|
|
Loading…
Reference in New Issue