Integration with Apollo
See original GitHub issueHi!,
I am working integrating react-select
with redux-form
and apollo-client
, so far the integration with redux-form is seamless, but my use case here being that when the user types something in the input, I will be grabbing data dynamically performing graphql calls through apollo. This leads me to two options.
-
Make use of
onInputChange
and trigger a new query, and pass the new options as props. However when I do this, the current input value gets reseted -
Use Select.Async and the
loadOptions
props. However, how Apollo client works is that I trigger a new query and then I receive the new data when it’s available via props, so there seems to be no easy solution to call the callback back with the new data, as I don’t have access to the request itself, right?.
Any ideas how / if this could be accomplished?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top GitHub Comments
Hey @alfonsoperez, how did you solve the Select.Async part with Apollo? Thanks
Thanks a lot @alfonsoperez! I also use it with redux form so very useful to me 😃 was battling all day to find a solution and there you go, thanks!! 😃 🥇