-
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
RESTDataSource implementation issue with willSendRequest
& @apollo/utils.withrequired
is a devDependency
#152
Comments
willSendRequest
& @apollo/utils.withrequired is a devDependencywillSendRequest
& @apollo/utils.withrequired
is a devDependency
@AvivonCtrl I was able to reproduce the issue with Can you share a reproduction with me? |
Just mentioned the isPlainObject, it is indeed not relevant. |
Should be noted that the documentations on the website right now are misleading and the code samples there are incorrect. |
Thanks @AvivonCtrl, I did try to correct those - the referenced PR immediately above this comment should have fixed the outstanding issues (I landed it a couple days ago but typed the reference to this issue incorrectly so it didn't link). Is there still misleading documentation somewhere or is that what you were referring to? |
While implementing
RESTDataSource
, following the example ofwillSendRequest
from the official documentation (https://www.apollographql.com/docs/apollo-server/data/fetching-rest/#setting-a-header) I encountered the following problems:willSendRequest
mentioned in the documentation is incorrect. The actual type signature can be found in the source code (https://github.com/apollographql/datasource-rest/blob/main/src/RESTDataSource.ts#L242):@apollo/utils.withrequired
is a devDependency, causing type resolution issues for new projects. TheWithRequired
type is undefined, requiring me to install@apollo/utils.withrequired
as a dependency in my project forAugmentedRequest
to be resolved correctly.isPlainObject
fromlodash.isplainobject
The text was updated successfully, but these errors were encountered: