import { gql, useQuery } from '@apollo/client';

const QUERY_WORKGROUP = gql`
  query workgroups {
    workgroups {
      id,
      name,
      createdAt,
      closedAt,
      members {
        id,
        email
      }
    }
  }
`;

export function useWorkgroupsQuery(options = {}) {
  return useQuery(QUERY_WORKGROUP, options);
}