Skip to content

Commit 080c209

Browse files
authored
add more options to query and mutation (#203)
1 parent 20f5771 commit 080c209

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/Client.re

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,21 +352,29 @@ let query =
352352
(
353353
~client,
354354
~request,
355+
~additionalTypenames=?,
355356
~fetchOptions=?,
357+
~fetch=?,
356358
~requestPolicy=?,
357359
~url=?,
358360
~pollInterval=?,
359361
~meta=?,
362+
~suspense=?,
363+
~preferGetMethod=?,
360364
(),
361365
) => {
362366
executeQuery(
363367
~client,
364368
~request,
369+
~additionalTypenames?,
365370
~fetchOptions?,
371+
~fetch?,
366372
~requestPolicy?,
367373
~url?,
368374
~pollInterval?,
369375
~meta?,
376+
~suspense?,
377+
~preferGetMethod?,
370378
(),
371379
)
372380
|> Wonka.take(1)
@@ -377,21 +385,29 @@ let mutation =
377385
(
378386
~client,
379387
~request,
388+
~additionalTypenames=?,
380389
~fetchOptions=?,
390+
~fetch=?,
381391
~requestPolicy=?,
382392
~url=?,
383393
~pollInterval=?,
384394
~meta=?,
395+
~suspense=?,
396+
~preferGetMethod=?,
385397
(),
386398
) => {
387399
executeMutation(
388400
~client,
389401
~request,
402+
~additionalTypenames?,
390403
~fetchOptions?,
404+
~fetch?,
391405
~requestPolicy?,
392406
~url?,
393407
~pollInterval?,
394408
~meta?,
409+
~suspense?,
410+
~preferGetMethod?,
395411
(),
396412
)
397413
|> Wonka.take(1)

src/Client.rei

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,15 @@ let query:
188188
(
189189
~client: t,
190190
~request: Types.request('response),
191+
~additionalTypenames: array(string)=?,
191192
~fetchOptions: Fetch.requestInit=?,
193+
~fetch: (string, Fetch.requestInit) => Js.Promise.t(Fetch.response)=?,
192194
~requestPolicy: Types.requestPolicy=?,
193195
~url: string=?,
194196
~pollInterval: int=?,
195197
~meta: Types.operationDebugMeta=?,
198+
~suspense: bool=?,
199+
~preferGetMethod: bool=?,
196200
unit
197201
) =>
198202
Js.Promise.t(clientResponse('response));
@@ -218,11 +222,15 @@ let mutation:
218222
(
219223
~client: t,
220224
~request: Types.request('response),
225+
~additionalTypenames: array(string)=?,
221226
~fetchOptions: Fetch.requestInit=?,
227+
~fetch: (string, Fetch.requestInit) => Js.Promise.t(Fetch.response)=?,
222228
~requestPolicy: Types.requestPolicy=?,
223229
~url: string=?,
224230
~pollInterval: int=?,
225231
~meta: Types.operationDebugMeta=?,
232+
~suspense: bool=?,
233+
~preferGetMethod: bool=?,
226234
unit
227235
) =>
228236
Js.Promise.t(clientResponse('response));

0 commit comments

Comments
 (0)