Found in: apollo-server-env@master
Expected: The exported fetch function declaration adheres to the fetch standard.
Actual: It differs from the fetch standard via marking the initial argument as optional.
declare function fetch(
input?: RequestInfo, // <--- this is what I'm on about
init?: RequestInit,
): Promise<Response>;
Background:
IMHO the exported fetch function shouldn't allow the first argument to be omitted. The MDN fetch page shows this arg as required as does the living fetch standard - fetch args are really Request ctor args :)
Why am I bothering you about this?
I've created my own fun fetch function and want to pass it along to a RemoteGraphQLDataSource , since the first arg to my fetch function isn't optional, tsc is complaining.
Found in:
apollo-server-env@masterExpected: The exported
fetchfunction declaration adheres to thefetchstandard.Actual: It differs from the
fetchstandard via marking the initial argument as optional.Background:
IMHO the exported
fetchfunction shouldn't allow the first argument to be omitted. The MDN fetch page shows this arg as required as does the living fetch standard -fetchargs are reallyRequestctor args :)Why am I bothering you about this?
I've created my own fun
fetchfunction and want to pass it along to aRemoteGraphQLDataSource, since the first arg to myfetchfunction isn't optional,tscis complaining.