Context
All list operations in the Node SDK return Promise<TListResult> directly (e.g., Promise<SubscriptionListResult>). The .NET SDK returns AsyncPageable<T> via ConnectorClientBase.CreatePageable<TPage, TItem>(), which automatically follows nextLink URLs across pages and yields items as an async enumerable.
Currently the Node SDK has no pagination at all — callers receive the first page and must manually implement nextLink following.
Parity gap
| Aspect |
.NET SDK |
Node SDK |
| Return type for lists |
AsyncPageable<T> (lazy, follows nextLink) |
Promise<TListResult> (first page only) |
| Caller experience |
await foreach (var item in client.ListAsync()) |
Manual nextLink loop |
| nextLink validation |
SSRF-protected in ResolveUrl() |
N/A (not implemented) |
| Azure SDK guideline |
AsyncPageable<T> / IPageable<T> |
PagedAsyncIterableIterator<T> required |
Proposed change
List operations should return PagedAsyncIterableIterator<T> from @azure/core-paging:
import { PagedAsyncIterableIterator } from "@azure/core-paging";
// e.g., in ArmClient
public listSubscriptions(options?: ListSubscriptionsOptions): PagedAsyncIterableIterator<Subscription>
This requires:
- Generator changes in
CodefulSdkGenerator to emit PagedAsyncIterableIterator return types
- Adding
@azure/core-paging as a dependency
- Implementing
nextLink following in ConnectorClientBase with SSRF protection (see companion SSRF issue)
This is a breaking change to all list method signatures and return types.
Azure SDK guideline
Context
All list operations in the Node SDK return
Promise<TListResult>directly (e.g.,Promise<SubscriptionListResult>). The .NET SDK returnsAsyncPageable<T>viaConnectorClientBase.CreatePageable<TPage, TItem>(), which automatically followsnextLinkURLs across pages and yields items as an async enumerable.Currently the Node SDK has no pagination at all — callers receive the first page and must manually implement
nextLinkfollowing.Parity gap
AsyncPageable<T>(lazy, follows nextLink)Promise<TListResult>(first page only)await foreach (var item in client.ListAsync())nextLinkloopResolveUrl()AsyncPageable<T>/IPageable<T>PagedAsyncIterableIterator<T>requiredProposed change
List operations should return
PagedAsyncIterableIterator<T>from@azure/core-paging:This requires:
CodefulSdkGeneratorto emitPagedAsyncIterableIteratorreturn types@azure/core-pagingas a dependencynextLinkfollowing inConnectorClientBasewith SSRF protection (see companion SSRF issue)This is a breaking change to all list method signatures and return types.
Azure SDK guideline
PagedAsyncIterableIteratorfor paginated operations