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.

Replace custom ApolloContext with official one

See original GitHub issue

Starting from react-apollo@2.5.3 we have access to the ApolloContext (https://unpkg.com/react-apollo@2.5.3/ApolloContext.js).

This would enable this library to get rid of the custom ApolloProvider and ApolloContext and just rely on react-apollo

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
FezVrastacommented, Apr 22, 2019

react-apollo@2.5.5 exposes its context now!

I’d be willing to prepare a PR but I’m not sure how would you like to proceed. Introduce a breaking change and completely deprecate the react-apollo-hooks context, or try to make both contexts work?

I would prefer to remove support for the custom context, but I see how people may like to use react-apollo-hooks without having to rely on react-apollo at all. But, considering this is just a temporary library while we wait for official support, I think it would make sense anyways.

@trojanowski what’s your opinion?

0reactions
danielkczcommented, Apr 26, 2019

@dantman For conditional querying, I made my own Query based on useQuery. Sometimes I opt for using skip in simple cases and when I need to access data in the body of a function. Render prop is just awkward with hooks around 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

@apollo/client | Yarn - Package Manager
The fclone package has been replaced with a custom cloneDeep implementation that is tolerant of cycles, symbol properties, and non-enumerable properties.
Read more >
Apollo Graphql Creating Directives Replacing field.type with a ...
I am creating a custom directive based on the next documentation: ... wrapType(field); } // Replace field.type with a custom ...
Read more >
How to add custom headers to GraphQL queries?
Is it possible to add custom headers to the GraphQL requests made by the Apollo client? You have to remove RedwoodProvider , and...
Read more >
GraphQL - GitLab Docs
When the response is added to the API, our custom local resolver can be removed. The only change to the query/fragment is to...
Read more >
Graphql · Fe guide · Development · Help · GitLab - LSDS
When the response is added to the API, our custom local resolver can be removed. The only change to the query/fragment is to...
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