Refresh comments threads and count on new comment (#276)

* Refresh comments threads and count on new comment

* Fix tests
This commit is contained in:
Charles Bochet
2023-06-12 19:32:18 +02:00
committed by GitHub
parent 3341539eb2
commit 16e1b862d9
17 changed files with 74 additions and 181 deletions

View File

@ -4,11 +4,6 @@ import { GraphqlQueryCompany } from '@/companies/interfaces/company.interface';
import { GraphqlQueryPerson } from '@/people/interfaces/person.interface';
import { GraphqlQueryUser } from '@/users/interfaces/user.interface';
import {
GetCompanyCommentsCountQuery,
GetPeopleCommentsCountQuery,
} from '../generated/graphql';
import { mockedCompaniesData } from './mock-data/companies';
import { mockedPeopleData } from './mock-data/people';
import { mockedUsersData } from './mock-data/users';
@ -98,17 +93,4 @@ export const graphqlMocks = [
}),
);
}),
graphql.query('GetPeopleCommentsCount', (req, res, ctx) => {
const mockedData: GetPeopleCommentsCountQuery = {
people: [{ commentsCount: 12 }],
};
return res(ctx.data(mockedData));
}),
graphql.query('GetCompanyCommentsCount', (req, res, ctx) => {
const mockedData: GetCompanyCommentsCountQuery = {
companies: [{ commentsCount: 20 }],
};
return res(ctx.data(mockedData));
}),
];