@uniflowed/relay 0.0.0-alpha.4 → 0.0.0-alpha.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,26 +1,47 @@
1
1
  // @flow
2
- //
3
- // `@uniflowed/relay`: Relay, re-exported.
4
- //
5
- // This is the real `react-relay`, not a declaration of it. uf owns
6
- // orchestration, not implementation: Relay is a store, a normaliser, a compiler
7
- // and a decade of work on cache consistency, and a uf-shaped reimplementation
8
- // would be a worse Relay that uf then had to keep up with.
9
- //
10
- // What uf adds is the toolchain around it. `uf check` type checks `graphql`
11
- // tagged templates against the artifacts Relay's compiler generates, and
12
- // `uf transform` rewrites those tags to the artifact they name. The library is
13
- // Meta's; the integration is uf's.
14
- //
15
- // `export *` rather than a list of names: the list was a second copy of
16
- // Relay's export surface, and Relay adds hooks faster than uf releases.
17
- //
18
- // Relay is a peer dependency, so its version is the project's. An application
19
- // can pin or override one with its package manager's `resolutions` without
20
- // waiting for a uf release.
21
-
22
- export * from "react-relay";
23
-
2
+ // Relay owns the runtime, normalized cache, compiler, and public types.
3
+ // Named value re-exports preserve Vite's CommonJS interop in the browser;
4
+ // export-star alone does not expose a prebundled CommonJS module's members.
5
+ // The namespace keeps access to the complete upstream runtime as it evolves.
6
+ // uf dev/build use Relay's Babel plugin; uf run relay runs the app's compiler.
7
+ export {
8
+ ConnectionHandler,
9
+ EntryPointContainer,
10
+ LocalQueryRenderer,
11
+ MutationTypes,
12
+ ProfilerContext,
13
+ QueryRenderer,
14
+ RangeOperations,
15
+ ReactRelayContext,
16
+ RelayEnvironmentProvider,
17
+ applyOptimisticMutation,
18
+ commitLocalUpdate,
19
+ commitMutation,
20
+ createFragmentContainer,
21
+ createPaginationContainer,
22
+ createRefetchContainer,
23
+ fetchQuery,
24
+ fetchQuery_DEPRECATED,
25
+ graphql,
26
+ loadEntryPoint,
27
+ loadQuery,
28
+ readInlineData,
29
+ requestSubscription,
30
+ useClientQuery,
31
+ useEntryPointLoader,
32
+ useFragment,
33
+ useLazyLoadQuery,
34
+ useMutation,
35
+ useMutationAction_EXPERIMENTAL,
36
+ usePaginationFragment,
37
+ usePrefetchableForwardPaginationFragment,
38
+ usePreloadedQuery,
39
+ useQueryLoader,
40
+ useRefetchableFragment,
41
+ useRelayEnvironment,
42
+ useSubscribeToInvalidationState,
43
+ useSubscription,
44
+ } from "react-relay";
45
+ export type * from "react-relay";
24
46
  import * as ReactRelay from "react-relay";
25
-
26
47
  export { ReactRelay };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/relay",
3
- "version": "0.0.0-alpha.4",
3
+ "version": "0.0.0-alpha.41",
4
4
  "description": "Relay, re-exported by name, for the Unified Toolchain for Flow (React).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,13 +11,18 @@
11
11
  "directory": "packages/relay"
12
12
  },
13
13
  "exports": {
14
- ".": "./index.js"
14
+ ".": "./index.js",
15
+ "./rsc_EXPERIMENTAL": "./rsc_EXPERIMENTAL.js",
16
+ "./rsc-client_EXPERIMENTAL": "./rsc-client_EXPERIMENTAL.js"
15
17
  },
16
18
  "files": [
17
- "index.js"
19
+ "index.js",
20
+ "rsc_EXPERIMENTAL.js",
21
+ "rsc-client_EXPERIMENTAL.js",
22
+ "!*.test.js"
18
23
  ],
19
24
  "peerDependencies": {
20
25
  "react": ">=19",
21
- "react-relay": ">=20"
26
+ "react-relay": ">=21"
22
27
  }
23
28
  }
@@ -0,0 +1,3 @@
1
+ // @flow
2
+ "use client";
3
+ export { useQueryFromServer } from "react-relay/rsc-client_EXPERIMENTAL.js";
@@ -0,0 +1,5 @@
1
+ // @flow
2
+ // Relay owns request-local caching and the preload protocol. Keep its explicit
3
+ // experimental entry point and types rather than inventing a parallel API.
4
+ export { createServerEnvironment } from "react-relay/rsc_EXPERIMENTAL.js";
5
+ export type { PreloadedQueryRef, ServerEnvironment } from "react-relay/rsc_EXPERIMENTAL.js";