export const queryDepartmentByUserId = `
  query MyQuery($user_id: Int!) {
    department_user(
      where: { deleted_at: { _is_null: true }, user_id: { _eq: $user_id } }
    ) {
      department {
        id
        name
        code
        department_manager_id
        department_users(where: {deleted_at: {_is_null: true}}) {
          user_id
          user_manager_id
        }
      }
    }
  }
`;
export const queryDepartmentIsManager = `
  query MyQuery($department_manager_id: _int4!) {
    find_department(
      args: { manager_id: $department_manager_id }
      where: { deleted_at: { _is_null: true } }
    ) {
      department {
        id
        name
        code
        department_manager_id
        department_users(where: {deleted_at: {_is_null: true}}) {
          user_id
          user_manager_id
        }
      }
    }
  }
`;
export const queryUserManageOfUserLevelFirst = `
  query queryUserManageOfUserLevelFirst($user_id: Int!) {
    department_user(
      where: {deleted_at: {_is_null: true}, user_id: {_eq: $user_id}}
    ) {
      user_manager_id
      department_id
      userByUserManagerId {
        full_name
        email
        email_secondary
        is_use_email_secondary
        department_users(where: {deleted_at: {_is_null: true}}) {
          user_manager_id
          department_id
        }
      }
    }
  }
`;
export const queryUserManageOfUserLevelSecond = `
  query queryUserManageOfUserLevelSecond($user_id: Int!) {
    department_user(where: {deleted_at: {_is_null: true}, user_id: {_eq: $user_id}}) {
      department {
        name
        department {
          name
          department_users(where: {deleted_at: {_is_null: true}}) {
            user_id
            user {
              full_name
              email
              email_secondary
              is_use_email_secondary
              user_roles(where: {deleted_at: {_is_null: true}}) {
                role {
                  is_master_role
                }
              }
            }
          }
        }
      }
    }
  }
`;
//# sourceMappingURL=index.js.map