rescript-apollo-client icon indicating copy to clipboard operation
rescript-apollo-client copied to clipboard

Support for RefetchQueriesFunction

Open maarekj opened this issue 3 years ago • 1 comments

Today in mutation, in refetchQueries, there is only support for Array<string | PureQueryOptions>, there is not support for RefetchQueriesFunction

https://github.com/jeddeloh/rescript-apollo-client/blob/3eba88457985a51048d51c9f57b6447978332827/src/%40apollo/client/react/types/ApolloClient__React_Types.res#L710

maarekj avatar Feb 08 '22 20:02 maarekj

In the latest Apollo client it's actually changed completely: https://github.com/apollographql/apollo-client/blob/a4b03cdb69ffb5164f0db2e34f842307ab95dba4/src/core/watchQueryOptions.ts#L229

I think the actual fix should probably be to switch to (result: FetchResult<TData>) => InternalRefetchQueriesInclude

jeddeloh avatar Feb 08 '22 22:02 jeddeloh