@@ -397,28 +397,29 @@ export declare namespace ApolloClient {
397
397
> {
398
398
/**
399
399
* The GraphQL query shape to be used constructed using the `gql` template
400
- * string tag from `graphql-tag` . The query will be used to determine the
400
+ * string tag. The query will be used to determine the
401
401
* shape of the data to be read.
402
402
*/
403
403
query : DocumentNode | TypedDocumentNode < TData , TVariables > ;
404
404
405
405
/**
406
406
* The root id to be used. Defaults to "ROOT_QUERY", which is the ID of the
407
- * root query object. This property makes writeQuery capable of writing data
408
- * to any object in the cache.
407
+ * root query object. This property makes `readQuery` capable of reading data
408
+ * from any object in the cache.
409
409
*/
410
410
id ?: string ;
411
411
412
412
/**
413
413
* Whether to return incomplete data rather than null.
414
- * Defaults to false.
414
+ * @defaultValue false
415
415
*/
416
416
returnPartialData ?: boolean ;
417
417
418
418
/**
419
- * Whether to read from optimistic or non-optimistic cache data. If
420
- * this named option is provided, the optimistic parameter of the
421
- * readQuery method can be omitted. Defaults to false.
419
+ * Whether to read from optimistic or non-optimistic cache data.
420
+ * This option should be preferred over the `optimistic` parameter of the
421
+ * `readQuery` method.
422
+ * @defaultValue false
422
423
*/
423
424
optimistic ?: boolean ;
424
425
}
@@ -447,16 +448,17 @@ export declare namespace ApolloClient {
447
448
> {
448
449
/**
449
450
* The root id to be used. This id should take the same form as the
450
- * value returned by your `dataIdFromObject ` function. If a value with your
451
+ * value returned by the `cache.identify ` function. If a value with your
451
452
* id does not exist in the store, `null` will be returned.
452
453
*/
453
454
id ?: string ;
454
455
455
456
/**
456
- * A GraphQL document created using the `gql` template string tag from
457
- * `graphql-tag` with one or more fragments which will be used to determine
457
+ * A GraphQL document created using the `gql` template string tag
458
+ * with one or more fragments which will be used to determine
458
459
* the shape of data to read. If you provide more than one fragment in this
459
- * document then you must also specify `fragmentName` to select a single.
460
+ * document then you must also specify `fragmentName` to specify which
461
+ * fragment is the root fragment.
460
462
*/
461
463
fragment : DocumentNode | TypedDocumentNode < TData , TVariables > ;
462
464
@@ -469,13 +471,14 @@ export declare namespace ApolloClient {
469
471
470
472
/**
471
473
* Whether to return incomplete data rather than null.
472
- * Defaults to false.
474
+ * @defaultValue false
473
475
*/
474
476
returnPartialData ?: boolean ;
475
477
/**
476
- * Whether to read from optimistic or non-optimistic cache data. If
477
- * this named option is provided, the optimistic parameter of the
478
- * readQuery method can be omitted. Defaults to false.
478
+ * Whether to read from optimistic or non-optimistic cache data.
479
+ * This option should be preferred over the `optimistic` parameter of the
480
+ * `readFragment` method.
481
+ * @defaultValue false
479
482
*/
480
483
optimistic ?: boolean ;
481
484
}
@@ -504,7 +507,7 @@ export declare namespace ApolloClient {
504
507
> {
505
508
/**
506
509
* The GraphQL query shape to be used constructed using the `gql` template
507
- * string tag from `graphql-tag` . The query will be used to determine the
510
+ * string tag. The query will be used to determine the
508
511
* shape of the data to be read.
509
512
*/
510
513
query : DocumentNode | TypedDocumentNode < TData , TVariables > ;
@@ -516,16 +519,18 @@ export declare namespace ApolloClient {
516
519
*/
517
520
id ?: string ;
518
521
/**
519
- * The data you will be writing to the store.
522
+ * The data to write to the store.
520
523
*/
521
524
data : Unmasked < TData > ;
522
525
/**
523
- * Whether to notify query watchers (default: true).
526
+ * Whether to notify query watchers.
527
+ * @defaultValue true
524
528
*/
525
529
broadcast ?: boolean ;
526
530
/**
527
531
* When true, ignore existing field data rather than merging it with
528
- * incoming data (default: false).
532
+ * incoming data.
533
+ * @defaultValue false
529
534
*/
530
535
overwrite ?: boolean ;
531
536
}
@@ -554,7 +559,7 @@ export declare namespace ApolloClient {
554
559
> {
555
560
/**
556
561
* The root id to be used. This id should take the same form as the
557
- * value returned by your `dataIdFromObject ` function. If a value with your
562
+ * value returned by the `cache.identify ` function. If a value with your
558
563
* id does not exist in the store, `null` will be returned.
559
564
*/
560
565
id ?: string ;
@@ -563,7 +568,8 @@ export declare namespace ApolloClient {
563
568
* A GraphQL document created using the `gql` template string tag from
564
569
* `graphql-tag` with one or more fragments which will be used to determine
565
570
* the shape of data to read. If you provide more than one fragment in this
566
- * document then you must also specify `fragmentName` to select a single.
571
+ * document then you must also specify `fragmentName` to specify which
572
+ * fragment is the root fragment.
567
573
*/
568
574
fragment : DocumentNode | TypedDocumentNode < TData , TVariables > ;
569
575
@@ -575,16 +581,18 @@ export declare namespace ApolloClient {
575
581
fragmentName ?: string ;
576
582
577
583
/**
578
- * The data you will be writing to the store.
584
+ * The data to write to the store.
579
585
*/
580
586
data : Unmasked < TData > ;
581
587
/**
582
- * Whether to notify query watchers (default: true).
588
+ * Whether to notify query watchers.
589
+ * @defaultValue true
583
590
*/
584
591
broadcast ?: boolean ;
585
592
/**
586
593
* When true, ignore existing field data rather than merging it with
587
- * incoming data (default: false).
594
+ * incoming data.
595
+ * @defaultValue false
588
596
*/
589
597
overwrite ?: boolean ;
590
598
}
@@ -857,7 +865,7 @@ export class ApolloClient {
857
865
*
858
866
* For example, suppose you call watchQuery on a GraphQL query that fetches a person's
859
867
* first and last name and this person has a particular object identifier, provided by
860
- * dataIdFromObject . Later, a different query fetches that same person's
868
+ * `cache.identify` . Later, a different query fetches that same person's
861
869
* first and last name and the first name has now changed. Then, any observers associated
862
870
* with the results of the first query will be updated with a new result object.
863
871
*
@@ -1031,7 +1039,7 @@ export class ApolloClient {
1031
1039
/**
1032
1040
* Tries to read some data from the store in the shape of the provided
1033
1041
* GraphQL query without making a network request. This method will start at
1034
- * the root query. To start at a specific id returned by `dataIdFromObject `
1042
+ * the root query. To start at a specific id returned by `cache.identify `
1035
1043
* use `readFragment`.
1036
1044
*
1037
1045
* @param optimistic - Set to `true` to allow `readQuery` to return
@@ -1142,7 +1150,7 @@ export class ApolloClient {
1142
1150
*
1143
1151
* @param optimistic - Set to `true` to allow `readFragment` to return
1144
1152
* optimistic results. Is `false` by default.
1145
- */
1153
+ */
1146
1154
public readFragment <
1147
1155
TData = unknown ,
1148
1156
TVariables extends OperationVariables = OperationVariables ,
@@ -1179,7 +1187,7 @@ export class ApolloClient {
1179
1187
/**
1180
1188
* Writes some data in the shape of the provided GraphQL query directly to
1181
1189
* the store. This method will start at the root query. To start at a
1182
- * specific id returned by `dataIdFromObject ` then use `writeFragment`.
1190
+ * specific id returned by `cache.identify ` then use `writeFragment`.
1183
1191
*/
1184
1192
public writeQuery <
1185
1193
TData = unknown ,
0 commit comments