Open simplenotezy opened 5 months ago
@knaeckeKami I know you're probably very busy, but if you ever get a few minutes, I would love your input on this one
Did you check https://ferry.gql-dart.dev/docs/flutter-operation-widget#usage-with-mutations ?
If yes, is there anything concrete you have question for?
Yes thank @knaeckeKami - I did review the whole documentation. Still, from that, it's not quite easy for me to understand how I can fire a single request on submit
You can execute final resultFuture = client.request(yourMutationReq).first
to execute the request and get a future that resolves when the response is there (or an error happens)
Interesting, thanks @knaeckeKami - I'll look into it again when working on the project, and report back. Thanks!
@knaeckeKami If it's awaited, will the loading state also be maintained? E.g. a prop on the button.
you'll need to use basic state management approaches (setState, FutureBuilder...) for that.
I am playing around with mutations and would like to have a simple flutter widget that has a button.
When that button is pressed the mutation will be fired, and the button should show a loading state.
It is not clear to me, having been in and out of the documentation and github issues on how to accomplish this.
Can somebody help me in the right direction?
Here me fumbling around in the dark: