This repository was archived by the owner on Nov 20, 2020. It is now read-only.
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
Type-safe useQuery #129
Open
Description
Right now, ~variables
expects any type:
let useQuery:
(
~client: ApolloClient.t=?,
~variables: 'raw_t_variables=?,
~notifyOnNetworkStatusChange: bool=?,
~fetchPolicy: ApolloHooksTypes.fetchPolicy=?,
~errorPolicy: ApolloHooksTypes.errorPolicy=?,
~skip: bool=?,
~pollInterval: int=?,
~context: Context.t=?,
graphqlDefinition('t, 'raw_t)
) =>
(variant('t), queryResult('t, 'raw_t, 'raw_t_variables))
So if you partially apply makeVariables
by forgetting a non-optional argument for example, this won't be detected by the type-checker.
Any idea how to solve this?
Metadata
Metadata
Assignees
Labels
No labels