Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Apollo Client 2.0 usage #80

Closed
pho3nixf1re opened this issue Oct 27, 2017 · 8 comments
Closed

Apollo Client 2.0 usage #80

pho3nixf1re opened this issue Oct 27, 2017 · 8 comments

Comments

@pho3nixf1re
Copy link

Apollo Client 2.0 requires a link option which is in conflict with setting the uri on createApolloFetch. Does this imply that apollo-fetch is now legacy for use with pre 2.0 clients?

@ctavan
Copy link
Contributor

ctavan commented Dec 6, 2017

@pho3nixf1re you are right, with Apollo Client 2.0 you no longer use apollo-fetch but apollo-link instead. See https://www.apollographql.com/docs/react/2.0-migration.html for an example.

See also #30 (comment)

@pho3nixf1re
Copy link
Author

@ctavan do you want to change this issue into a README fix to add a note? Otherwise you may get more questions like this.

@ctavan
Copy link
Contributor

ctavan commented Dec 6, 2017

@pho3nixf1re well, I'm not a maintainer of apollo-fetch, so I don't feel entitled to decide how apollo-fetch should be communicated. If it is decided to deprecate apollo-fetch entirely, then this should definitely be noted in the README.

@evans @jbaxleyiii how do you think about this?

@evans
Copy link
Contributor

evans commented Dec 8, 2017

We don't have a concrete plan for apollo-fetch. I think there is a reasonable argument for keeping it around as a lightweight client, separate from Apollo Client.

When we start to work on continuous deployment and other monorepo tooling, apollo-fetch might become a testing ground for that development.

@ctavan is there anything more you would like to see apollo-fetch do?

@ctavan
Copy link
Contributor

ctavan commented Dec 8, 2017

@evans no, just as you mention I would also like to keep apollo-fetch as an ultra-lightweight client. All I would really need is a variant of it that does not pollute the globale scope with a fetch polyfill, but that should be achieved by #30.

@evans
Copy link
Contributor

evans commented Feb 23, 2018

@ctavan It seems like the best way to go with apollo-fetch is make you a collaborator! 🎉

I can also give you publish permissions if you would like to keep apollo-fetch alive as an ultra-lightweight client for the long term

@ctavan
Copy link
Contributor

ctavan commented Jun 1, 2018

I have added a deprecation warning to the README with #193 for now.

@ctavan ctavan closed this as completed Jun 1, 2018
@kachkaev
Copy link

kachkaev commented Jun 8, 2018

Given that this module is deprecated, what's the best way to fetch graphql data inside an express server (say, in a background job)?

I tried using apollo-link / HttpLink, but could not get things working. The arguments of execute() are too complex and Observable result makes it hard to write simple async / await logic.

My task is to ping the GraphQL server on interval and ask it for the latest data. If it has changed, I'm updating the sitemap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants