'Vue3 composition API useMutation appolo response
I am building a Vue3 app with the composition API. Installed it correctly. In my template is a button (just for testing purpose):
<button @click="getToken"> get token </button>
When I click this button I can see in the chrome developer tools (network tab) that this Graphql mutation is executed and is respponding correctly.
<script setup>
import { useQuery, useMutation } from "@vue/apollo-composable";
import gql from "graphql-tag";
const { mutate: getToken} = useMutation(gql`
mutation login {
login(
authProfileUuid: "1234567"
username: "[email protected]"
password: "secret"
) {
jwtToken
}
}
`,)
</script>
My problem is that i just can't figure out how to get access to the JSON data in the response. Its my first time using apollo and can't find it in the docs. Can anyone help me ?
Martijn D.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
