Start porting to new urql api

It compiles. Not tested
This commit is contained in:
2023-05-03 16:41:17 +02:00
parent ce8eb86569
commit f235b5e911
12 changed files with 224 additions and 142 deletions

View File

@@ -10,7 +10,7 @@
<script>
import { Modal, ModalBody, ModalHeader, ModalFooter, Button, ListGroup } from 'sveltestrap'
import { getContext } from 'svelte'
import { mutation } from '@urql/svelte'
import { gql, getContextClient , mutationStore } from '@urql/svelte'
export let metrics
export let isOpen
@@ -53,11 +53,15 @@
}
}
const updateConfiguration = mutation({
query: `mutation($name: String!, $value: String!) {
const updateConfiguration = ({ name, value }) => {
result = mutationStore({
client: getContextClient(),
query: gql`mutation($name: String!, $value: String!) {
updateConfiguration(name: $name, value: $value)
}`
}`,
variables: {name, value}
})
}
let columnHovering = null