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
-[Client and Provider](/docs/client-and-provider.md)
24
+
-[Hooks](/docs/hooks.md)
25
+
-[Exchanges](/docs/exchanges.md)
26
+
-[Errors](/docs/error.md)
27
+
-[Advanced](/docs/advanced.md)
25
28
26
29
## 💾 Installation
27
30
28
-
#### 1. Install `reason-urql`.
31
+
#### 1. Install `reason-urql` and its `peerDependencies`.
29
32
30
33
```sh
31
-
yarn add reason-urql
34
+
yarn add reason-urql urql graphql
32
35
```
33
36
34
-
#### 2. Add `graphql_ppx_re`.
37
+
We try to keep our bindings as close to latest `urql` as possible. However, `urql` tends to make releases a bit ahead of `reason-urql`. To get a compatible version, we recommend always staying strictly within this project's `peerDependency` range for `urql`.
35
38
36
-
To get the most out of compile time type checks for your GraphQL queries, mutations, and subscriptions, we recommend using [`graphql_ppx_re`](https://github.com/reasonml-community/graphql_ppx). `useDynamicMutation` in particular takes advantage of some of its internals for an excellent experience writing type safe code to access your GraphQL responses.
39
+
#### 2. Add `@reasonml-community/graphql-ppx`.
40
+
41
+
To get the most out of compile time type checks for your GraphQL queries, mutations, and subscriptions, we use [`@reasonml-community/graphql-ppx`](https://github.com/reasonml-community/graphql-ppx). Add this to your project's `devDependencies`.
37
42
38
43
```sh
39
-
yarn add @baransu/graphql_ppx_re --dev
44
+
yarn add @reasonml-community/graphql-ppx --dev
40
45
```
41
46
42
47
#### 3. Update `bsconfig.json`.
43
48
44
-
Add `reason-urql`to your `bs-dependencies` and `graphql_ppx_re` to your `ppx_flags` in `bsconfig.json`.
49
+
Add `reason-urql`, `wonka`, and `@reasonml-community/graphql-ppx`to your `bs-dependencies` and `@reasonml-community/graphql-ppx/ppx` to your `ppx_flags` in `bsconfig.json`.
Finally, you'll need to send an introspection query to your GraphQl API, using a tool like [`graphql-cli`](https://github.com/Urigo/graphql-cli/). You should generate a file called `graphql_schema.json` at the root of your project that `graphql_ppx_re` can use to type check your queries. **You should check this file into version control** and keep it updated as your API changes.
64
+
Finally, you'll need to send an introspection query to your GraphQl API, using a tool like [`graphql-cli`](https://github.com/Urigo/graphql-cli/). You should generate a file called `graphql_schema.json` at the root of your project that `graphql-ppx` can use to type check your queries. **You should check this file into version control** and keep it updated as your API changes.
56
65
57
-
For additional instructions, head [here](https://github.com/reasonml-community/graphql_ppx#usage).
66
+
For additional help, head [here](https://github.com/reasonml-community/graphql-ppx#schema).
0 commit comments