Open tsnobip opened 4 years ago
Right now, ~variables expects any type:
~variables
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.
makeVariables
Any idea how to solve this?
This should be resolved in both #117 and #122 branches. The variables arg is required and there are some convenience functions and Extension modules for making the ergonomics better.
Right now,
~variables
expects any type: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?