Skip to content

Commit

Permalink
Fixing role editing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dexter committed Jun 16, 2023
1 parent ae3cb9b commit da9f3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
11 changes: 3 additions & 8 deletions src/lib/Form/RoleSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = '';
Expand Down Expand Up @@ -107,7 +102,7 @@
<button
type="button"
on:click={async () => {
await stopRole.mutate({ id: role.id });
await stopRole.mutate({ id: role.id }, { metadata: { isBoard: true } });
await refetch();
}}>Stop</button
>
Expand Down

0 comments on commit da9f3b6

Please sign in to comment.