Last active
September 8, 2022 02:37
-
-
Save joshmenden/7a967e99b0371e6e99ffa3da92169ebb 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