Skip to content
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

Add final method call to request context header #478

Merged
merged 12 commits into from
Jul 19, 2024

Conversation

bryantpark04
Copy link
Contributor

No description provided.

@bryantpark04 bryantpark04 self-assigned this Jul 12, 2024
@bryantpark04 bryantpark04 force-pushed the bryantp/add-request-context-header branch from 11e6c29 to a1a7a69 Compare July 12, 2024 19:49
@bryantpark04 bryantpark04 marked this pull request as ready for review July 12, 2024 20:06
@@ -141,11 +146,23 @@ export function createObjectSet<Q extends ObjectOrInterfaceDefinition>(
asyncIter: async function*(): AsyncIterableIterator<Osdk<Q, "$all">> {
let $nextPageToken: string | undefined = undefined;
do {
const result = await base.fetchPage({ $nextPageToken });
Copy link
Contributor Author

@bryantpark04 bryantpark04 Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason that we call base.fetchPage here instead of calling the unbound fetchPageInternal? Or is the latter also fine?

@bryantpark04 bryantpark04 force-pushed the bryantp/add-request-context-header branch from aba07bd to 353d3ec Compare July 15, 2024 22:02
@@ -148,7 +151,15 @@ export function createObjectSet<Q extends ObjectOrInterfaceDefinition>(
ObjectOrInterfacePropertyKeysFrom2<Q>,
boolean,
"throw"
> = await base.fetchPage({ $nextPageToken });
> = await fetchPageInternal(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer your previous question, I think we used base here so we wouldn't need to duplicate the fetchPageInternal code again

Copy link
Contributor

@ssanjay1 ssanjay1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after discussion, just lets make sure to comment the augmentRequestContext method

@bryantpark04 bryantpark04 merged commit dec005b into main Jul 19, 2024
7 checks passed
@bryantpark04 bryantpark04 deleted the bryantp/add-request-context-header branch July 19, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants