there's something I suppose it should be easy but I can not find out the answer after searching the web for a long time:
I was just trying to make a mutation using graphql then refresh data using another graphql query afterwards, how can I make this happen inside only one HTTP(graphql) request?
Failed trys:
- I tried sending two graphql schemas wrapped inside one array use batching, but it's async and the query gets back before the mutation which is not desired.
- I tried to write the same query using mutation which actually mutates nothing and put that after the real mutation, this works but I don't believe this is the optimized solution for this.
- Also, I know there's something like
update
(refetchQuery) etc by apollo-client(react), but how can I do this without any client framework?
Thanks:)
related links: