menu
Channels
Team
Posts
Members
Info

Understanding Apollo-Link and storing things into the store.

I'm new to using Apollo/Apollo link and have gone through: https://www.youtube.com/watch?v=2RvRcnD8wHY&feature=youtu.be and the https://www.apollographql.com/docs/link/links/state. Can someone confirm for me that if I want to "store" something into the apollo store do I do it…

thumbsup
0
message-simple
2

Knowing when queries are no longer mounted or watched from Link

Is there a good way to understand what Queries are still active from a Link? I am working on an auto subscription link which needs to listen to outgoing queries and their returned data, and based on what is returned make a number of subscriptions to patch the data. I would like…

thumbsup
0
message-simple
0
tuturu·13d

using logger middleware

I'm trying to create a composing link using ApolloLink.from([apolloLogger, httpLink]) but ApolloClient only accepts uri which is a single string. It seems like the link option is deprecated?

thumbsup
0
message-simple
2

Shared state in Electron using Apollo

I've been working on a project recently that uses Electron and has multiple windows. I've been experimenting with several approaches. All approaches assume that there is one background window (hidden) that is the source of truth. 1. Have each window use it's own full Apollo…

thumbsup
0
message-simple
0

Thoughts on a testing/mocking library

I've noticed that the recommended MockProvider approach to testing results in a lot of duplicate test data spread across multiple queries, as well as very brittle tests that break in a lot of places just by adding one field to a query, even if you provided that data elsewhere. I…

thumbsup
0
message-simple
0

apollo-link-schema provides graphql environment in Electron Main Process

I used apollo-link-schema to provide the graphql executor in electron main process. Though the library says it is useful to only in SSR, this really works well for my use case to run graphql in electron main process using ipc.

thumbsup
0
message-simple
0

SSR apollo link http not passing authentication cookies

I have a nextjs app running on localhost:3000 and a graphql server running at localhost:8000. I have a login mutation that is writing a cookie to the response. cors is set up on the graphql server with credentials: true and origin: 'http://localhost:3000'. On the nextjs end I am…

thumbsup
0
message-simple
0

Debugging help? Export 'setContext' is not defined

Earlier today my static assets build, using parcel, on Heroku, started failing without any code changes on my part. The error I'm getting is this: remote: 🚨 /tmp/build_1c58c75726fe4cba805be16c65e64aec/node_modules/apollo-link-context/lib/bundle.esm.js:28:9: Export 'setContext'…

thumbsup
0
message-simple
1

Best patterns for retrying existing operation using mutate function.

TL;DR 1) What will be the best way to access update method passed to mutation inside links? 2) Is there any way to call client.mutate using operation object (that has reference to update method? …

thumbsup
0
message-simple
1

How mutate cached datas and remote datas with the same mutation?

Hi y'all, I use to use @client directive to mutate local datas with apollo-link-state. Now, I would like to mutate remote datas and local datas at the same time. I thought about write something like that: But that's seems a bit stupid. I read the documentation to find something…

thumbsup
0
message-simple
2