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

fix: [GH-267] Fix CacheOptions Related Types #268

Merged
merged 9 commits into from
Oct 18, 2023

Conversation

HishamAli81
Copy link
Contributor

@HishamAli81 HishamAli81 commented Oct 10, 2023

  • Fix RequestOptions.cacheOptions function return type to also return a non-promise value.
  • Fix propagation of the cache options generic type RequestOptions and AugmentedRequest.

Fixes #267

* Fix RequestOptions.cacheOptions function return type to also return a non-promise value.
* Fix propagation of the cache options generic type `RequestOptions` and `AugmentedRequest`.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 10, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Update generic args when calling policyRequestFrom()
@trevor-scheer
Copy link
Member

Hi @HishamAli81, this looks good to me. I added one more commit, would you take a look and let me know if you agree with the change? I think it makes sense to update the type of the fetch argument requestOpts as well. This allows us to clean up some spots where TS couldn't infer the type argument automatically.

hisham-otofacts and others added 3 commits October 17, 2023 12:29
* Fix RequestOptions.cacheOptions function return type to also return a non-promise value.
* Fix propagation of the cache options generic type `RequestOptions` and `AugmentedRequest`.
Update generic args when calling policyRequestFrom()
.changeset/perfect-experts-sell.md Outdated Show resolved Hide resolved
@HishamAli81
Copy link
Contributor Author

Hi @HishamAli81, this looks good to me. I added one more commit, would you take a look and let me know if you agree with the change? I think it makes sense to update the type of the fetch argument requestOpts as well. This allows us to clean up some spots where TS couldn't infer the type argument automatically.

Looks good to me. Thanks!

@trevor-scheer trevor-scheer merged commit 870ba80 into apollographql:main Oct 18, 2023
9 checks passed
@github-actions github-actions bot mentioned this pull request Oct 18, 2023
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.

Fix CacheOptions Related Types
3 participants