-
Notifications
You must be signed in to change notification settings - Fork 309
Closed
Description
Description
This code
import request, { RequestDocument, Variables } from 'graphql-request'
export const requestWrapper = <T, V extends Variables = Variables>(
document: RequestDocument,
variables: V,
) => request<T, V>('/api/graphql', document, variables)gives me this error:
Argument of type '[V]' is not assignable to parameter of type 'VariablesAndRequestHeadersArgs<V>'.
Though unless I am missing something, the typing should work just fine. Is there anything I am doing wrong, or is something up with the typing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels