From da9f3b6c4ea94e31ffe6438aaef7bdfd4077da59 Mon Sep 17 00:00:00 2001 From: Dexter Date: Fri, 16 Jun 2023 16:25:51 +0200 Subject: [PATCH] Fixing role editing --- src/client.ts | 2 +- src/lib/Form/RoleSelector.svelte | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/client.ts b/src/client.ts index 14a4c69..0badaf9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,5 +1,5 @@ import { HoudiniClient } from '$houdini'; -import { env } from '$env/dynamic/public' +import { env } from '$env/dynamic/public'; export default new HoudiniClient({ url: env.PUBLIC_GRAPHQL_ENDPOINT, diff --git a/src/lib/Form/RoleSelector.svelte b/src/lib/Form/RoleSelector.svelte index 343f70e..1012e70 100644 --- a/src/lib/Form/RoleSelector.svelte +++ b/src/lib/Form/RoleSelector.svelte @@ -2,12 +2,7 @@ import Select from 'svelte-select'; import { formatDate } from '$lib/format'; - import { - graphql, - fragment, - type PersonRoles, - type PersonRoles$data, - } from '$houdini'; + import { graphql, fragment, type PersonRoles, type PersonRoles$data } from '$houdini'; export let person: PersonRoles; export let readonly: boolean = false; @@ -77,7 +72,7 @@ // Check for duplicates if (!currentRoles.some((currentRole) => role === currentRole.role)) { - await createRole.mutate({ personId: person.id, role }); + await createRole.mutate({ personId: person.id, role }, { metadata: { isBoard: true } }); } roleSelect = ''; @@ -107,7 +102,7 @@