Skip to content

Commit d441e10

Browse files
feat: add support for @rescript/react, urql 2, and bs-platform 9 (#254)
BREAKING CHANGE: reason-react will no longer be supported
1 parent e0eaf96 commit d441e10

37 files changed

+199
-439
lines changed

__tests__/Types_test.res

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ let mockOperationContext: Types.operationContext = {
88
fetchOptions: None,
99
requestPolicy: #CacheFirst,
1010
url: "https://localhost:3000/graphql",
11-
pollInterval: None,
1211
meta: None,
1312
suspense: Some(false),
1413
preferGetMethod: Some(false),
@@ -25,7 +24,8 @@ let mockOperation = {
2524
}
2625
}
2726

28-
describe("Types", () => describe("hookResponseToReason", () => {
27+
describe("Types", () =>
28+
describe("hookResponseToReason", () => {
2929
it(
3030
"should correctly return Fetching constructor if fetching is true and no data has been received",
3131
() => {
@@ -181,4 +181,5 @@ describe("Types", () => describe("hookResponseToReason", () => {
181181
open Expect
182182
expect(result.response) |> toEqual(Types.Hooks.Empty)
183183
})
184-
}))
184+
})
185+
)

bsconfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
}
2424
],
2525
"suffix": ".bs.js",
26-
"bs-dependencies": [
27-
"reason-react",
28-
"wonka",
29-
"bs-fetch"
30-
],
26+
"bs-dependencies": ["@rescript/react", "wonka", "bs-fetch"],
3127
"bs-dev-dependencies": ["@glennsl/bs-jest"],
3228
"refmt": 3,
3329
"warnings": {

docs/client-and-provider.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ Imperatively execute a GraphQL query operation.
118118
| `fetchOptions` | `Fetch.requestInit=?` | Optional. The fetch options to apply on the outgoing request. |
119119
| `requestPolicy` | `Types.requestPolicy=?` | Optional. The request policy to use to execute the query. Defaults to `"cache-first"`. |
120120
| `url` | `string=?` | Optional. The GraphQL endpoint to use for the executing operation (if different from the one specified by `Client.make`). |
121-
| `pollInterval` | `int=?` | Optional. Instructs the client to reexecute the query every `pollInterval` milliseconds. |
122121
| `meta` | `Types.operationDebugMeta=?` | Optional. Add metadata that is only available in development with devtools. |
123122
| `suspense` | `bool=?` | Optional. A flag activating the experimental React suspense mode, which can be used during server-side rendering to prefetch data. Defaults to `false`. |
124123
| `preferGetMethod` | `bool=?` | Optional. If `true`, will use the HTTP GET method rather than POST for operations of type `query`. Defaults to `false`. |
@@ -208,7 +207,6 @@ Execute a GraphQL mutation operation.
208207
| `fetchOptions` | `Fetch.requestInit=?` | Optional. The fetch options to apply on the outgoing request. |
209208
| `requestPolicy` | `Types.requestPolicy=?` | Optional. The request policy to use to execute the query. Defaults to `"cache-first"`. |
210209
| `url` | `string=?` | Optional. The GraphQL endpoint to use for the executing operation (if different from the one specified by `Client.make`). |
211-
| `pollInterval` | `int=?` | Optional. Instructs the client to reexecute the query every `pollInterval` milliseconds. |
212210
| `meta` | `Types.operationDebugMeta=?` | Optional. Add metadata that is only available in development with devtools. |
213211
| `suspense` | `bool=?` | Optional. A flag activating the experimental React suspense mode, which can be used during server-side rendering to prefetch data. Defaults to `false`. |
214212
| `preferGetMethod` | `bool=?` | Optional. If `true`, will use the HTTP GET method rather than POST for operations of type `query`. Defaults to `false`. |
@@ -298,7 +296,6 @@ Execute a GraphQL subscription operation. If using the `executeSubscription` met
298296
| `fetchOptions` | `Fetch.requestInit=?` | Optional. The fetch options to apply on the outgoing request. |
299297
| `requestPolicy` | `Types.requestPolicy=?` | Optional. The request policy to use to execute the query. Defaults to `"cache-first"`. |
300298
| `url` | `string=?` | Optional. The GraphQL endpoint to use for the executing operation (if different from the one specified by `Client.make`). |
301-
| `pollInterval` | `int=?` | Optional. Instructs the client to reexecute the query every `pollInterval` milliseconds. |
302299
| `meta` | `Types.operationDebugMeta=?` | Optional. Add metadata that is only available in development with devtools. |
303300
| `suspense` | `bool=?` | Optional. A flag activating the experimental React suspense mode, which can be used during server-side rendering to prefetch data. Defaults to `false`. |
304301
| `preferGetMethod` | `bool=?` | Optional. If `true`, will use the HTTP GET method rather than POST for operations of type `query`. Defaults to `false`. |

0 commit comments

Comments
 (0)