import type * as Types from '../schema'; import gql from 'graphql-tag'; import * as Urql from '@urql/vue'; export type Omit = Pick>; export type AddNoticeMutationVariables = Types.Exact<{ payload: Types.NoticeInputType; }>; export type AddNoticeMutation = ( { __typename?: 'Mutation' } & { createNotice: ( { __typename: 'NoticeType' } & Pick & { departments?: Types.Maybe )>>, groups?: Types.Maybe )>> } ) | ( { __typename: 'OperationError' } & Pick ) } ); export type EditNoticeMutationVariables = Types.Exact<{ uid: Types.Scalars['String']['input']; payload: Types.NoticeInputType; }>; export type EditNoticeMutation = ( { __typename?: 'Mutation' } & { updateNotice: ( { __typename: 'NoticeType' } & Pick & { departments?: Types.Maybe )>>, groups?: Types.Maybe )>> } ) | ( { __typename: 'OperationError' } & Pick ) } ); export type DeleteNoticeMutationVariables = Types.Exact<{ uid: Types.Scalars['String']['input']; }>; export type DeleteNoticeMutation = ( { __typename?: 'Mutation' } & { deleteNotice: ( { __typename: 'DeletedItem' } & Pick ) | ( { __typename: 'OperationError' } & Pick ) } ); export const AddNoticeDocument = gql` mutation AddNotice($payload: NoticeInputType!) { createNotice(payload: $payload) { ... on NoticeType { __typename uid title body expiry createdByUid departments { uid name } groups { uid name } } ... on OperationError { __typename error suggestion } } } `; export function useAddNoticeMutation() { return Urql.useMutation(AddNoticeDocument); }; export const EditNoticeDocument = gql` mutation editNotice($uid: String!, $payload: NoticeInputType!) { updateNotice(uid: $uid, payload: $payload) { ... on NoticeType { __typename uid title body expiry createdByUid departments { uid name } groups { uid name } } ... on OperationError { __typename error suggestion } } } `; export function useEditNoticeMutation() { return Urql.useMutation(EditNoticeDocument); }; export const DeleteNoticeDocument = gql` mutation deleteNotice($uid: String!) { deleteNotice(uid: $uid) { ... on DeletedItem { __typename uid } ... on OperationError { __typename error suggestion } } } `; export function useDeleteNoticeMutation() { return Urql.useMutation(DeleteNoticeDocument); };