Skip to content

Releases: zth/rescript-relay

4.2.2

Choose a tag to compare

@zth zth released this 30 Jan 10:14
  • Fix issue with empty arrays and refetch variables. #601

4.2.0

Choose a tag to compare

@tsnobip tsnobip released this 16 Dec 07:47
84e2816
  • Simplify missingFieldHandlers.
  • Fix behavior of refetchVariables on optional variables.
  • Support @exhaustive on inline fragments.

4.1.0

Choose a tag to compare

@zth zth released this 05 Dec 17:58
  • Add support for autoExhaustiveTypes config and a @nonExhaustive directive to control automatic exhaustive checks for unions/interfaces.

  • Add React-free mode support and split React APIs into RescriptRelayReact.

    • New compiler config: rescriptRelayMode: "Default" | "NonReact" (defaults to "Default").
    • PPX -non-react
    • Mark @rescript/react and react-relay as optional peer deps so non‑React usage does not require them.
  • BREAKING: Move all React-specific APIs out of RescriptRelay into RescriptRelayReact.

    • RescriptRelay.Context.Provider -> RescriptRelayReact.Context.Provider
    • RescriptRelay.useEnvironmentFromContext -> RescriptRelayReact.useEnvironmentFromContext
    • RescriptRelay.useSubscribeToInvalidationState -> RescriptRelayReact.useSubscribeToInvalidationState

    Migration:

    • Update imports/usages in app code to reference RescriptRelayReact for the APIs listed above.
    • For non‑React usage, set rescriptRelayMode: "NonReact" in relay.config.js and pass -non-react to the PPX.

4.0.0

Choose a tag to compare

@zth zth released this 26 Oct 21:21
c18e266
  • Support @exhaustive on interfaces as well.
  • Remove ReactDOMExperimental module, since everything needed is in the official RescriptReact bindings now.
  • Move fully to ReScript v12. From 4.x, only v12 is supported.

3.5.0

Choose a tag to compare

@zth zth released this 07 Oct 10:38
  • Move underlying Relay compiler version to 20.1.1.

3.4.0

Choose a tag to compare

@zth zth released this 07 Oct 09:25
  • Add support for @exhaustive - a directive to trigger exhaustiveness checks for unions at the GraphQL operation level.
  • BREAKING Drop __typename in inline records, since that conflicts with using @tag("__typename") in ReScript v12 and is not necessary since __typename is set automatically via @tag.

3.3.0

Choose a tag to compare

@zth zth released this 12 Jul 18:33
  • Add support for top level @catch on fragments on unions.
  • Add parameter excludedIds: array<dataId> to invalidateRecordsByIds to allow excluding a list of connection IDs from invalidation.
  • BREAKING: operation.text and operation.id are now nullable, which better reflects what values they can actually have in runtime.
  • fix bug where custom scalars would error when set to null in refetch variables.

3.1.0

Choose a tag to compare

@zth zth released this 14 Dec 20:46
2a6cb0f

This brings the Relay version to 18.2.0.

If you have enabled the feature flags in relay.config.js for aliased fragments or Relay resolvers you'll need to remove them from the config file as they are now on by default, and not removing them will cause the compiler to fail with a non super helpful error message.

  • Upgrade versions: react-relay and relay-runtime to 18.2.0.
  • Add support for Fragment.waitForFragmentData, a new API in Relay 18.2 that lets you wait for fragment data outside of React.
  • Experimental: Add a "non React" mode to the PPX, which makes sure only APIs that don't rely on React directly are exposed. This is intended to be a way to simplify using RescriptRelay without React. Activate by passing -non-react to the PPX, like "ppx-flags": [["rescript-relay/ppx", "-non-react"]].