Hide some warnings from apollo

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-06-23 16:06:35 +02:00
parent 54f2974555
commit b02fecfc78
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -34,6 +34,11 @@ export const possibleTypes = types.reduce((acc, type) => {
return acc; return acc;
}, {} as Record<string, string[]>); }, {} as Record<string, string[]>);
const replaceMergePolicy = <TExisting = any, TIncoming = any>(
_existing: TExisting,
incoming: TIncoming
): TIncoming => incoming;
export const typePolicies: TypePolicies = { export const typePolicies: TypePolicies = {
Discussion: { Discussion: {
fields: { fields: {
@ -61,6 +66,8 @@ export const typePolicies: TypePolicies = {
participants: paginatedLimitPagination<IParticipant>(["roles"]), participants: paginatedLimitPagination<IParticipant>(["roles"]),
comments: pageLimitPagination<IComment>(), comments: pageLimitPagination<IComment>(),
relatedEvents: pageLimitPagination<IEvent>(), relatedEvents: pageLimitPagination<IEvent>(),
options: { merge: replaceMergePolicy },
participantStats: { merge: replaceMergePolicy },
}, },
}, },
RootQueryType: { RootQueryType: {