import { client, gqlContext } from '@operato/graphql';
import gql from 'graphql-tag';
import { showToast } from '../../utils/alert';
export const getBoard = async (name) => {
    const response = await client.query({
        query: gql `
      query BoardByNameEaas($name: String!) {
        boardByNameEaas(name: $name) {
          id
          name
          model
        }
      }
    `,
        variables: { name },
        context: gqlContext()
    });
    if (response.errors) {
        showToast('요청에 실패하였습니다');
        throw new Error('요청에 실패하였습니다');
    }
    return response.data.boardByNameEaas;
};
//# sourceMappingURL=board.js.map