Skip to content

Instantly share code, notes, and snippets.

@joshmenden
Last active September 3, 2022 01:52
Show Gist options
  • Select an option

  • Save joshmenden/2827925633d6c4674b2dd486f8a4184f to your computer and use it in GitHub Desktop.

Select an option

Save joshmenden/2827925633d6c4674b2dd486f8a4184f 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