refactor: add graphcache codegen and update types

This commit is contained in:
Andrew Bastin
2021-10-15 18:00:18 +05:30
parent 02d5f0fdf3
commit 39de34f083
7 changed files with 107 additions and 39 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
}