Comments (1)
Good question @helfer! Both packages are definitely very similar in what they can do, however we've taken a few different design decisions resulting in a (arguably) more flexible API:
-
With
graphql-request
you can send a query/mutation with a single line of code where as you need to instantiate a client first forgraphql-fetch
-
Given that we're relying quite heavily on Typescript (and others on Flow), with
graphql-request
you can provide a generic type parameter to get a typed result back. This is a big deal when building bigger applications consisting of many small scripts/functions.
from graphql-request.
Related Issues (20)
- Improved middleware handling
- `Content-Type` duplication in POST requests HOT 1
- what is the benefit in using this package instead of axios?
- GraphQLClient `errorPolicy: "all"` does not work HOT 2
- Adding a remove header option HOT 2
- support nextjs13 fetch revalidate HOT 4
- Wrong request reference
- graphql-request is throwing error TypeError: setPosition is not a function error HOT 4
- Disable window focus change refetching HOT 3
- Error in getResult function HOT 1
- Remove CommonJS build
- Replace `GraphQLClientRequestHeaders` with built-in `HeadersInit` type
- Types not exported through package.json HOT 1
- Fail to run project: "Module parse failed: Unexpected token", due to coalesing operator HOT 1
- Don't export GraphQLClientRequestHeaders in src/index.ts HOT 1
- ECONNRESET on node19+ HOT 2
- Connection pooling Mechanism HOT 2
- Empty result when variable isn't set or set with null HOT 1
- Cannot find module 'graphql-request/build/esm/types' or its corresponding type declarations.ts HOT 10
- Extension to bring back file upload support
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 graphql-request.