Comments (8)
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.
@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.
@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.
@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.
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.
@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.
@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.
I have added a deprecation warning to the README with #193 for now.
from apollo-fetch.
Related Issues (20)
- Network request failed. Payload is not serializable: Converting circular structure to JSON HOT 5
- Can you return error from middleware to client? HOT 1
- TypeScript Compile Type Error while calling introspectSchema with 'apollo-fetch' HOT 1
- ReactNativeFile alternative if not using ReactNative
- Use fetch-ponyfill instead of isomorphic-fetch polyfill HOT 4
- Maximum call stack size exceeded
- self.fetch.bind(self) not defined in the browserified js file HOT 1
- Consider default construct options where apollo-fetch limits the request body passed on. HOT 3
- Make the package look more lightweight HOT 2
- Unable to override Apollo Client's default content-type 'application/json' header HOT 4
- Can custom fetch be the default behavior HOT 4
- Websocket support? HOT 1
- Error : Unexpected token < in JSON HOT 1
- Feature: File upload? HOT 18
- [feature idea] graphql-tag support. HOT 5
- What's the advantage of afterware vs. middleware? HOT 5
- Error: Can't find variable: self HOT 1
- Feature idea: Use a speedier JSON stringifier?
- Readme example doesn't typecheck
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-fetch.