mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
parent
0a5bc02499
commit
4d0af3eb7e
@ -62,23 +62,47 @@ export const graphqlMocks = {
|
||||
});
|
||||
},
|
||||
),
|
||||
graphql.query('FindManyViews', ({ variables }) => {
|
||||
const objectMetadataId = variables.filter?.objectMetadataId?.eq;
|
||||
const viewType = variables.filter?.type?.eq;
|
||||
|
||||
graphql.query('SearchPeople', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
views: {
|
||||
edges: mockedViewsData
|
||||
.filter(
|
||||
(view) =>
|
||||
view?.objectMetadataId === objectMetadataId &&
|
||||
view?.type === viewType,
|
||||
)
|
||||
.map((view) => ({
|
||||
node: view,
|
||||
cursor: null,
|
||||
})),
|
||||
searchPeople: {
|
||||
edges: peopleMock.slice(0, 3).map((person) => ({
|
||||
node: person,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('SearchCompanies', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
searchCompanies: {
|
||||
edges: companiesMock.slice(0, 3).map((company) => ({
|
||||
node: company,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('SearchOpportunities', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
searchOpportunities: {
|
||||
edges: [],
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
|
Loading…
Reference in New Issue
Block a user