question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apollo Link State queries not supported

See original GitHub issue

Apollo Link State (client state handling for Apollo) uses the @client directive for queries that query the local state. They can look like this:

query {
  amount @client {
    amount
  }
}

These seem to not be supported in the plugin, see attached:

2018-03-02_10h53_22

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:8

github_iconTop GitHub Comments

3reactions
LavaToastercommented, Apr 2, 2018

If you add the following into your GraphQL schema, it should prevent this from showing as an error.

directive @client on FIELD
Read more comments on GitHub >

github_iconTop Results From Across the Web

Persisted Queries Link - Apollo GraphQL Docs
GET requests are not compatible with @apollo/client/link/batch-http . If you want to use GET for non-mutation queries whether or not they are hashed, ......
Read more >
Custom query resolvers not working · Issue #196 - GitHub
I think, for local state query, request method at this line is not getting invoked. Data is returned from cache before hitting request....
Read more >
Apollo Link State Default Resolver Not Working (@client query ...
The default resolver for todos returns all the todos in the defaults, as expected. The default resolvers don't do anything with arguments passed ......
Read more >
Local State Management – Angular - GraphQL Code Generator
As of Apollo Client 2.5, local state handling is baked into the core, which means it is no longer necessary to use apollo-link-state...
Read more >
Migrating to Apollo Client 3.0
It is important to note that Apollo Client 3 no longer allows @client fields to be passed through a Link chain. While Apollo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found