hey guys, Apollo GraphQL React - how to query on c...
# prisma-whats-new
v
hey guys, Apollo GraphQL React - how to query on click?
m
@vacom apollo has a
refetch
method on the
data
prop. http://dev.apollodata.com/react/receiving-updates.html#refetch
v
@mannigan Yes i know but i want to call a new query from onclick to get new data
m
v
thanks a lot, its working!
m
awesome!
you can get the client via a higher order component if you dont want to import / export it. http://dev.apollodata.com/react/higher-order-components.html#withApollo
v
Thank you very much, I was doing okay so I did not know it was based on a promise, when I went to see API through your link, I read and I saw that it was a promise and I changed to what was missing and now it works.