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
/**A missing field handler, which is a way of teaching Relay more about the relations in your schema, so it can fulfill more things from the cache. Read more [in this section of the Relay docs](https://relay.dev/docs/guided-tour/reusing-cached-data/filling-in-missing-data/).*/
662
663
@tag("kind")
663
664
typerect=
665
+
/** a `MissingFieldHandler.t` for scalar fields. Give this a handler function that returns `null` (to indicate that data exists but is null), `undefined` (to indicate data is still missing), or a scalar value (to indicate that the value exists even though it's not in the cache, and is the value you send back).*/
664
666
| @as("scalar")
665
667
Scalar({
666
668
handle: (
@@ -670,6 +672,7 @@ module MissingFieldHandler: {
670
672
ReadOnlyRecordSourceProxy.t,
671
673
) =>nullable<'scalarValue>,
672
674
}): t
675
+
/** a `MissingFieldHandler.t` for linked fields (other objects/records). Give this a handler function that returns `null` (to indicate that the link exists but the linked record is null), `undefined` (to indicate data is still missing), or a `dataId` of the record that is linked at this field.*/
673
676
| @as("linked")
674
677
Linked({
675
678
handle: (
@@ -679,6 +682,7 @@ module MissingFieldHandler: {
679
682
ReadOnlyRecordSourceProxy.t,
680
683
) =>nullable<dataId>,
681
684
}): t
685
+
/** a `MissingFieldHandler.t` for lists of linked fields (other objects/records). Give this a handler function that returns `null` (to indicate that the link exists but the linked array of records is null), `undefined` (to indicate data is still missing), or an array of `nullable<dataId>` where the `dataId`'s are the linked records/objects.*/
682
686
| @as("pluralLinked")
683
687
PluralLinked({
684
688
handle: (
@@ -689,7 +693,7 @@ module MissingFieldHandler: {
689
693
) =>nullable<array<nullable<dataId>>>,
690
694
}): t
691
695
692
-
/**Make a `MissingFieldHandler.t` for scalar fields. Give this a handler function that returns `Js.null` (to indicate that data exists but is null), `Js.undefined` (to indicate data is still missing), or a scalar value (to indicate that the value exists even though it's not in the cache, and is the value you send back).*/
696
+
/**Make a `MissingFieldHandler.t` for scalar fields. Give this a handler function that returns `null` (to indicate that data exists but is null), `undefined` (to indicate data is still missing), or a scalar value (to indicate that the value exists even though it's not in the cache, and is the value you send back).*/
693
697
letmakeScalarMissingFieldHandler: (
694
698
(
695
699
normalizationScalarField,
@@ -699,7 +703,7 @@ module MissingFieldHandler: {
699
703
) =>Nullable.t<'scalarValue>
700
704
) =>t
701
705
702
-
/**Make a `MissingFieldHandler.t` for linked fields (other objects/records). Give this a handler function that returns `Js.null` (to indicate that the link exists but the linked record is null), `Js.undefined` (to indicate data is still missing), or a `dataId` of the record that is linked at this field.*/
706
+
/**Make a `MissingFieldHandler.t` for linked fields (other objects/records). Give this a handler function that returns `null` (to indicate that the link exists but the linked record is null), `undefined` (to indicate data is still missing), or a `dataId` of the record that is linked at this field.*/
703
707
letmakeLinkedMissingFieldHandler: (
704
708
(
705
709
normalizationLinkedField,
@@ -709,7 +713,7 @@ module MissingFieldHandler: {
709
713
) =>Nullable.t<dataId>
710
714
) =>t
711
715
712
-
/**Make a `MissingFieldHandler.t` for lists of linked fields (other objects/records). Give this a handler function that returns `None` (to indicate data is missing), or an array of `nullable<dataId>` where the `dataId`'s are the linked records/objects or `None` when they are missing.*/
716
+
/**Make a `MissingFieldHandler.t` for lists of linked fields (other objects/records). Give this a handler function that returns `null` (to indicate that the link exists but the linked array of records is null), `undefined` (to indicate data is still missing), or an array of `nullable<dataId>` where the `dataId`'s are the linked records/objects.*/
0 commit comments