20 lines
332 B
TypeScript
20 lines
332 B
TypeScript
|
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);
|
||
|
}
|