feat: fix subscription auth refresh issues

This commit is contained in:
Andrew Bastin
2021-10-31 17:40:03 +05:30
committed by liyasthomas
parent d9e5d4aec5
commit e31c0a9d02
3 changed files with 30 additions and 6 deletions

View File

@@ -3,7 +3,6 @@ import { GraphCacheUpdaters, MyTeamsDocument } from "../graphql"
export const updatesDef: GraphCacheUpdaters = {
Subscription: {
teamMemberAdded: (_r, { teamID }, cache, _info) => {
debugger
cache.invalidate(
{
__typename: "Team",
@@ -38,6 +37,24 @@ export const updatesDef: GraphCacheUpdaters = {
"teamMembers"
)
},
teamInvitationAdded: (_r, { teamID }, cache, _info) => {
cache.invalidate(
{
__typename: "Team",
id: teamID,
},
"teamInvitations"
)
},
teamInvitationRemoved: (_r, { teamID }, cache, _info) => {
cache.invalidate(
{
__typename: "Team",
id: teamID,
},
"teamInvitations"
)
},
},
Mutation: {
deleteTeam: (_r, { teamID }, cache, _info) => {