GithubHelp home page GithubHelp logo

Comments (8)

kachkaev avatar kachkaev commented on May 7, 2024 1

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.

from apollo-fetch.

ctavan avatar ctavan commented on May 7, 2024

@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)

from apollo-fetch.

pho3nixf1re avatar pho3nixf1re commented on May 7, 2024

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

from apollo-fetch.

ctavan avatar ctavan commented on May 7, 2024

@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?

from apollo-fetch.

evans avatar evans commented on May 7, 2024

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?

from apollo-fetch.

ctavan avatar ctavan commented on May 7, 2024

@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.

from apollo-fetch.

evans avatar evans commented on May 7, 2024

@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

from apollo-fetch.

ctavan avatar ctavan commented on May 7, 2024

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

from apollo-fetch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.