generated from apollographql/typescript-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 20
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 CacheOptions Related Types #267
Comments
HishamAli81
pushed a commit
to HishamAli81/datasource-rest-GH-267
that referenced
this issue
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`.
HishamAli81
pushed a commit
to HishamAli81/datasource-rest-GH-267
that referenced
this issue
Oct 17, 2023
Update generic args when calling policyRequestFrom()
trevor-scheer
pushed a commit
to HishamAli81/datasource-rest-GH-267
that referenced
this issue
Oct 17, 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`.
trevor-scheer
pushed a commit
to HishamAli81/datasource-rest-GH-267
that referenced
this issue
Oct 17, 2023
Update generic args when calling policyRequestFrom()
HishamAli81
pushed a commit
to HishamAli81/datasource-rest-GH-267
that referenced
this issue
Oct 18, 2023
trevor-scheer
pushed a commit
that referenced
this issue
Oct 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem:
There are a couple issues with the
CacheOptions
related types.First, the
RequestOptions.cacheOptions
function returns aPromise<CO | undefined>
, whereas theRESTDataSource.cacheOptionsFor()
andHttpCache.fetch()
functions both accept a function that returnsValueOrPromise<CO | undefined>
.Second, there are a number of places where the
CO
cache option generics argument is being propagated through toRequestOptions
andAugmentedRequest
The text was updated successfully, but these errors were encountered: