menu
Channels
Team
Posts
Members
Info

Do subscriptions update cache automatically?

I am using subscriptions in a component. I used to have this subscription in my component As you can see, it just waits for updates on the application and if there are any updates I update the cache. The code is working fine but I wanted to improve it. As I am only updating the…

thumbsup
0
message-simple
2

Replacing Redux - how to share request state to non-descendant component?

I'm trying to adopt Apollo in a React application that currently uses Redux for state management. I know that many people use Apollo's cache as a global application state, instead of using Redux. I don't know how to deal with this use case: • In Component A, a user clicks a…

thumbsup
2
message-simple
9

Is my mutation submit button properly formed?

I have an issue where the onSubmit handler isn't firing. Is it possible that my mutation call is malformed?

thumbsup
0
message-simple
25

Can `<Query>` ever return `data==undefined`?

According to the docs at https://www.apollographql.com/docs/react/api/react-apollo/?origin_team=T029GG40X#render-prop-function, QueryResult.data defaults to undefined. But in our testing (and year+ of experience), we've never actually seen the value undefined; even when…

thumbsup
0
message-simple
2

(Resolved) Change state from useMutation result

I'd like to navigate back* after a mutation result comes back, but doing it in the way suggested in the docs doesn't seem to work, since you can't update state within the render function: ... in a functional component ... const [doMutation, doMutationResult] =…

thumbsup
0
message-simple
1

Allow nested custom resolve with CacheRedirects

We are trying to query something like this: After we query medias_cursor({"all_medias":true,"active":true,"ids":["361","362","363"]}), we've already got the three Media objects here - (Media:361, Media:362, Media:363). …

thumbsup
0
message-simple
0

QueryResult does not contain data property

QueryResult has "excursion" property but no data property. The rest are there: loading, error, refetch.

thumbsup
0
message-simple
1

Testing components that use getQuery hook?

Having trouble getting tests for components that use the useQuery hook to pass. Here is a Stack Overflow post w/ my current attempt at setting up the tests --> https://stackoverflow.com/questions/57060842/example-of-how-to-test-a-component-that-uses-usequery The data returned by…

thumbsup
0
message-simple
0

TS types for updateQuery inside subscribeToMore function

When I'm using it like this: <MyTopLevelQuery> {.... …

thumbsup
0
message-simple
2

Correct pattern for updating props from router properties?

I have a UI that is navigating through a collection of items by using the URL pattern, like this: This triggers a render function that executes a query to get a new item object, and then passes that as a prop to an inner component, like this: This almost works. When I change the…

thumbsup
0
message-simple
3