Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save joshmenden/7a967e99b0371e6e99ffa3da92169ebb to your computer and use it in GitHub Desktop.

Select an option

Save joshmenden/7a967e99b0371e6e99ffa3da92169ebb to your computer and use it in GitHub Desktop.
<script setup>
import { ref } from 'vue'
import gql from 'graphql-tag'
const MY_MUTATION = gql`
mutation MyAwesomeMutation {
// something awesome
}
`
let { mutate, onDone } = useMutation(MY_MUTATION, {
// specify your client name here!
clientId: 'otherClient',
fetchPolicy: 'no-cache'
})
onDone((response) => {
// do something awesome when done
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment