Skip to content

Commit ff4012e

Browse files
committed
fix comments
1 parent e6072a5 commit ff4012e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/rescript-relay/src/RescriptRelay.resi

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,10 @@ module MissingFieldHandler: {
659659
selections: array<JSON.t>,
660660
}
661661

662+
/**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/).*/
662663
@tag("kind")
663664
type rec t =
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).*/
664666
| @as("scalar")
665667
Scalar({
666668
handle: (
@@ -670,6 +672,7 @@ module MissingFieldHandler: {
670672
ReadOnlyRecordSourceProxy.t,
671673
) => nullable<'scalarValue>,
672674
}): 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.*/
673676
| @as("linked")
674677
Linked({
675678
handle: (
@@ -679,6 +682,7 @@ module MissingFieldHandler: {
679682
ReadOnlyRecordSourceProxy.t,
680683
) => nullable<dataId>,
681684
}): 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.*/
682686
| @as("pluralLinked")
683687
PluralLinked({
684688
handle: (
@@ -689,7 +693,7 @@ module MissingFieldHandler: {
689693
) => nullable<array<nullable<dataId>>>,
690694
}): t
691695

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).*/
693697
let makeScalarMissingFieldHandler: (
694698
(
695699
normalizationScalarField,
@@ -699,7 +703,7 @@ module MissingFieldHandler: {
699703
) => Nullable.t<'scalarValue>
700704
) => t
701705

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.*/
703707
let makeLinkedMissingFieldHandler: (
704708
(
705709
normalizationLinkedField,
@@ -709,7 +713,7 @@ module MissingFieldHandler: {
709713
) => Nullable.t<dataId>
710714
) => t
711715

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.*/
713717
let makePluralLinkedMissingFieldHandler: (
714718
(
715719
normalizationLinkedField,

0 commit comments

Comments
 (0)