You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-15Lines changed: 21 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
+
> [!IMPORTANT]
2
+
> The next version (`8`) of `graphql-request` is being renamed to `graffle`. It has the same base simplicity but with many fixes, enhancements, and major new type safe features.
3
+
> It is not released yet but will be in the coming weeks/months and is already usable. Learn more about it [here](https://github.com/jasonkuhrt/graffle/discussions/1026). You can see the in progress website at https://graffle.js.org.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
8
14
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -23,8 +29,8 @@ Minimal GraphQL client supporting Node and browsers for scripts or simple apps.
23
29
-[Knowledge Base](#knowledge-base)
24
30
-[Why was the file upload feature taken away? Will it return?](#why-was-the-file-upload-feature-taken-away-will-it-return)
25
31
-[Why do I have to install `graphql`?](#why-do-i-have-to-install-graphql)
26
-
-[Do I need to wrap my GraphQL documents inside the `gql` template exported by `graphql-request`?](#do-i-need-to-wrap-my-graphql-documents-inside-the-gql-template-exported-by-graphql-request)
27
-
-[What sets `graphql-request` apart from other clients like Apollo, Relay, etc.?](#what-sets-graphql-request-apart-from-other-clients-like-apollo-relay-etc)
32
+
-[Do I need to wrap my GraphQL documents inside the `gql` template exported by `graffle`?](#do-i-need-to-wrap-my-graphql-documents-inside-the-gql-template-exported-by-graffle)
33
+
-[What sets `graffle` apart from other clients like Apollo, Relay, etc.?](#what-sets-graffle-apart-from-other-clients-like-apollo-relay-etc)
28
34
-[Project Stats](#project-stats)
29
35
-[Package Installs](#package-installs)
30
36
-[Repo Beats](#repo-beats)
@@ -43,7 +49,7 @@ Minimal GraphQL client supporting Node and browsers for scripts or simple apps.
43
49
## Install
44
50
45
51
```sh
46
-
npm add graphql-request graphql
52
+
npm add graffle graphql
47
53
```
48
54
49
55
#### TypeScript Setup
@@ -58,7 +64,7 @@ This package uses [`package.exports`](https://www.typescriptlang.org/docs/handbo
58
64
Send a GraphQL document using a static request function:
59
65
60
66
```js
61
-
import { gql, request } from'graphql-request'
67
+
import { gql, request } from'graffle'
62
68
63
69
constdocument=gql`
64
70
{
@@ -84,7 +90,7 @@ await request({
84
90
A class is available for constructing your own instances:
@@ -163,7 +169,7 @@ Return both the errors and data, only works with `rawRequest`.
163
169
164
170
### IgnoreOperationName
165
171
166
-
OperationName has been introduced to address issues reported here [Support operation name](https://github.com/jasonkuhrt/graphql-request/issues/64),
172
+
OperationName has been introduced to address issues reported here [Support operation name](https://github.com/jasonkuhrt/graffle/issues/64),
167
173
However, on certain occasions this information may not be needed in requests. In such cases, you might consider ignoring operationName to avoid the extraction steps currently performed by a parsing operation when the document is provided in string format.
168
174
169
175
By default the GraphQLClient tries to extract the operationName from the document.
@@ -185,28 +191,28 @@ const client = new GraphQLClient(endpoint, {
185
191
186
192
#### Why was the file upload feature taken away? Will it return?
187
193
188
-
In [this issue](https://github.com/jasonkuhrt/graphql-request/issues/500) we decided to make this library more stable and maintainable. In principal the feature is still in scope of this library and will make a return when we find time to do the feature right.
194
+
In [this issue](https://github.com/jasonkuhrt/graffle/issues/500) we decided to make this library more stable and maintainable. In principal the feature is still in scope of this library and will make a return when we find time to do the feature right.
189
195
190
196
#### Why do I have to install `graphql`?
191
197
192
-
`graphql-request` uses methods exposed by the `graphql` package to handle some internal logic. On top of that, for TypeScript users, some types are used from the `graphql` package to provide better typings.
198
+
`graffle` uses methods exposed by the `graphql` package to handle some internal logic. On top of that, for TypeScript users, some types are used from the `graphql` package to provide better typings.
193
199
194
-
#### Do I need to wrap my GraphQL documents inside the `gql` template exported by `graphql-request`?
200
+
#### Do I need to wrap my GraphQL documents inside the `gql` template exported by `graffle`?
195
201
196
202
No. It is there for convenience so that you can get the tooling support like automatic formatting and syntax highlighting. You can use `gql` from `graphql-tag` if you need it for some reason too.
197
203
198
-
#### What sets `graphql-request` apart from other clients like Apollo, Relay, etc.?
204
+
#### What sets `graffle` apart from other clients like Apollo, Relay, etc.?
199
205
200
-
`graphql-request` is the most minimal and simplest to use GraphQL client. It's perfect for small scripts or simple apps.
206
+
`graffle` is the most minimal and simplest to use GraphQL client. It's perfect for small scripts or simple apps.
201
207
202
-
Compared to GraphQL clients like Apollo or Relay, `graphql-request` doesn't have a built-in cache and has no integrations for frontend frameworks. The goal is to keep the package and API as minimal as possible.
208
+
Compared to GraphQL clients like Apollo or Relay, `graffle` doesn't have a built-in cache and has no integrations for frontend frameworks. The goal is to keep the package and API as minimal as possible.
0 commit comments