Remplacement de Redux/Saga par Apollo
This commit is contained in:
20
client/src/gql/queries/workgroups.tsx
Normal file
20
client/src/gql/queries/workgroups.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user