refactor: add graphcache codegen and update types

This commit is contained in:
Andrew Bastin
2021-10-15 18:00:18 +05:30
committed by liyasthomas
parent 9f0956556f
commit a12315d81a
7 changed files with 141 additions and 87 deletions

View File

@@ -1,6 +1,6 @@
import { OptimisticMutationConfig } from "@urql/exchange-graphcache"
import { GraphCacheOptimisticUpdaters } from "../graphql"
export const optimisticDefs: OptimisticMutationConfig = {
export const optimisticDefs: GraphCacheOptimisticUpdaters = {
deleteTeam: () => true,
leaveTeam: () => true,
renameTeam: ({ teamID, newName }) => ({
@@ -9,5 +9,4 @@ export const optimisticDefs: OptimisticMutationConfig = {
name: newName,
}),
removeTeamMember: () => true,
// TODO: updateTeamMemberRole
}