menu
Channels
Team
Posts
Members
Info

useQuery hook not causing a component re render

When I write to the local apollo store using client.writeData, it causes a re rendering of the components using the useQuery hook. When I pass in a variable to the query, and filter data based on this variable in a custom client side resolver, the useQuery won't trigger when I…

thumbsup
0
message-simple
0

Using virtual fields on local data

Hi guys. I see in the documentation that it is possible to add virtual fields to server data. Is it also possible to add virtual fields to local data? My use case is, for example, if I have a firstName and lastName field stored locally, I would like to have a fullName field…

thumbsup
0
message-simple
2

How does Local State objectively compares to Redux?

Let me say straight away that it's been like 2-3 years since I've used Redux and I've never used Apollo Local State in practice. Back then when Local State was being introduced I wrote this little fluff response to it:…

thumbsup
0
message-simple
1

Client Local State from Rest API

Can someone point me to an example where I can set local state for Apollo Client from a rest API? Right now I'm using the code below inside a function component, however, it appears this is not working because when I use the Apollo dev tools it has the old default value and not…

thumbsup
0
message-simple
2

Finding cached list item by nested value

Hi guys, I have a list of items which i am storing in cache with writeQuery(), but how can i find an item by it's nested value like: Btw i am a bit new to Apollo and Graphql

thumbsup
0
message-simple
0

Local state query variables does not work

Hi there. It is possible to get all items(filtered) from my local state? For example This code does not work. My items array is empty and I don't know why. I see many items in Apollo cache.

thumbsup
0
message-simple
16

Having issues with introspection

I have a generic filtering component. Currently you give me a filterProps object so I know what your are filtering by, I would like to reduce the amount of code needed for this. I would like instead of providing the filter fields, you only provide the filter type, and with…

thumbsup
0
message-simple
0

Undo/Redo functionality proposal

Through my Google/DuckDuckGo searches, I can't find anyone who has made a package for adding undo/redo to Apollo Local State. It seems like we have to write this one ourselves. This link does a great job explaining how to add undo/redo with redux but a lot of similar stuff can…

thumbsup
2
message-simple
0

Local resolver not resolving on first page load

I am doing some fairly complex stuff with my Apollo GraphQL client. So far it has been great, but there is one annoying issue I am working through. I tried to set up some resolvers asynchronously (the resolvers depend on some other async app state). I am not sure if this is the…

thumbsup
0
message-simple
8

Apollo client requires link for offline

Hi, I want to use apollo client for local offline storage, i.e. there is no backend, however, when I leave out the link property in the ApolloClient constructor I get the runtime error that the link property is missing. Any ideas what to do?

thumbsup
0
message-simple
1