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
Feed a list of missing field handlers into `Environment.make` if you want to use them.*/
637
637
moduleMissingFieldHandler: {
638
-
@@warning("-30")
639
-
640
-
/**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/).*/
/**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).*/
680
693
letmakeScalarMissingFieldHandler: (
681
694
(
682
695
normalizationScalarField,
683
-
Nullable.t<'record>,
696
+
nullable<'record>,
684
697
'args,
685
698
ReadOnlyRecordSourceProxy.t,
686
699
) =>'scalarValue
687
700
) =>t
688
701
689
-
typenormalizationLinkedField= {
690
-
alias: Nullable.t<string>,
691
-
name: string,
692
-
storageKey: Nullable.t<string>,
693
-
args: Nullable.t<array<normalizationArgument>>,
694
-
concreteType: Nullable.t<string>,
695
-
plural: bool,
696
-
selections: array<JSON.t>,
697
-
}
698
-
699
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.*/
700
703
letmakeLinkedMissingFieldHandler: (
701
704
(
702
705
normalizationLinkedField,
703
-
Nullable.t<RecordProxy.t>,
706
+
nullable<RecordProxy.t>,
704
707
'args,
705
708
ReadOnlyRecordSourceProxy.t,
706
-
) =>Nullable.t<dataId>
709
+
) =>option<dataId>
707
710
) =>t
708
711
709
712
/**Make a `MissingFieldHandler.t` for lists of 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 an array of `Js.Nullable.t<dataId>` where the `dataId`'s are the linked records/objects.*/
0 commit comments