Hide some warnings from apollo
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
54f2974555
commit
b02fecfc78
@ -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: {
|
||||||
|
Loading…
Reference in New Issue
Block a user