@ -62,21 +62,12 @@ export const graphqlMocks = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
graphql.query('FindManyViews', ({ variables }) => {
|
graphql.query('SearchPeople', () => {
|
||||||
const objectMetadataId = variables.filter?.objectMetadataId?.eq;
|
|
||||||
const viewType = variables.filter?.type?.eq;
|
|
||||||
|
|
||||||
return HttpResponse.json({
|
return HttpResponse.json({
|
||||||
data: {
|
data: {
|
||||||
views: {
|
searchPeople: {
|
||||||
edges: mockedViewsData
|
edges: peopleMock.slice(0, 3).map((person) => ({
|
||||||
.filter(
|
node: person,
|
||||||
(view) =>
|
|
||||||
view?.objectMetadataId === objectMetadataId &&
|
|
||||||
view?.type === viewType,
|
|
||||||
)
|
|
||||||
.map((view) => ({
|
|
||||||
node: view,
|
|
||||||
cursor: null,
|
cursor: null,
|
||||||
})),
|
})),
|
||||||
pageInfo: {
|
pageInfo: {
|
||||||
@ -89,6 +80,39 @@ export const graphqlMocks = {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
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,
|
||||||
|
startCursor: null,
|
||||||
|
endCursor: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}),
|
||||||
graphql.query('FindManyViewFields', ({ variables }) => {
|
graphql.query('FindManyViewFields', ({ variables }) => {
|
||||||
const viewId = variables.filter.view.eq;
|
const viewId = variables.filter.view.eq;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user