Fix update current client

This commit is contained in:
Chocobozzz
2019-08-21 11:25:09 +02:00
parent 4bc70d5070
commit a353eb49a3
8 changed files with 236 additions and 208 deletions

View File

@@ -14,19 +14,19 @@ export function buildCurrentUserResolver(cache: ApolloCache<NormalizedCacheObjec
});
return {
updateCurrentUser: (_, { id, email, isLoggedIn }, { cache }) => {
const data = {
Mutation: {
Mutation: {
updateCurrentUser: (_, { id, email, isLoggedIn }, { cache }) => {
const data = {
currentUser: {
id,
email,
isLoggedIn,
__typename: 'CurrentUser',
},
},
};
};
cache.writeData({ data });
cache.writeData({ data });
},
},
};
}