Last active
September 3, 2022 01:52
-
-
Save joshmenden/2827925633d6c4674b2dd486f8a4184f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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