Alucard
03/17/2021, 4:31 AMHyeseong Kim
03/17/2021, 7:06 AMHyeseong Kim
03/17/2021, 7:07 AMAlucard
03/17/2021, 7:08 AMHyeseong Kim
03/17/2021, 7:08 AMHyeseong Kim
03/17/2021, 7:09 AMHyeseong Kim
03/17/2021, 7:09 AMHyeseong Kim
03/17/2021, 7:10 AM@client
는 그대로 쓰셔도 되고 local resolvers 가 대체된거에요
예제 참고해보세요
https://github.com/apollographql/ac3-state-management-examples/blob/master/apollo-local-state/src/cache.tsxAlucard
03/17/2021, 7:20 AMAlucard
03/17/2021, 7:29 AMHyeseong Kim
03/17/2021, 7:44 AMHyeseong Kim
03/17/2021, 7:44 AM__typename
?Alucard
03/18/2021, 12:55 AMclient.writeData()
로 set 하고
export const GET_LOCAL_STATE = gql`
query {
isAuthenticated @client
user @client {
id
}
}
`;
Alucard
03/18/2021, 12:56 AM__typename
을 항상 적어줘야 됬었거든요 아무래도 graphql response 랑 같이 캐시에 들어가니Alucard
03/18/2021, 12:56 AM