jeddeloh / rescript-apollo-client

ReScript bindings for the Apollo Client ecosystem
MIT License
127 stars 18 forks source link

Support for RefetchQueriesFunction #142

Open maarekj opened 2 years ago

maarekj commented 2 years ago

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

jeddeloh commented 2 years ago

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