react-relay 0.0.0-main-2ae7e5a9 → 0.0.0-main-49b74be8

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-2ae7e5a9
2
+ * Relay v0.0.0-main-49b74be8
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/hooks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-2ae7e5a9
2
+ * Relay v0.0.0-main-49b74be8
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/hooks.js.flow CHANGED
@@ -11,6 +11,8 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ /* eslint relay-internal/esm-compatible-cjs: error */
15
+
14
16
  const EntryPointContainer = require('./relay-hooks/EntryPointContainer.react');
15
17
  const loadEntryPoint = require('./relay-hooks/loadEntryPoint');
16
18
  const {loadQuery} = require('./relay-hooks/loadQuery');
@@ -62,26 +64,37 @@ export type {
62
64
  FetchPolicy,
63
65
  } from 'relay-runtime';
64
66
 
67
+ const {
68
+ ConnectionHandler,
69
+ applyOptimisticMutation,
70
+ commitLocalUpdate,
71
+ commitMutation,
72
+ graphql,
73
+ readInlineData,
74
+ requestSubscription,
75
+ fetchQuery,
76
+ } = RelayRuntime;
77
+
65
78
  /**
66
79
  * The public interface for Relay Hooks.
67
80
  * This will eventually become the main public interface for react-relay.
68
81
  */
69
82
  module.exports = {
70
- ConnectionHandler: RelayRuntime.ConnectionHandler,
83
+ ConnectionHandler,
71
84
 
72
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
73
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
74
- commitMutation: RelayRuntime.commitMutation,
75
- graphql: RelayRuntime.graphql,
76
- readInlineData: RelayRuntime.readInlineData,
77
- requestSubscription: RelayRuntime.requestSubscription,
85
+ applyOptimisticMutation,
86
+ commitLocalUpdate,
87
+ commitMutation,
88
+ graphql,
89
+ readInlineData,
90
+ requestSubscription,
78
91
 
79
92
  EntryPointContainer: EntryPointContainer,
80
93
  RelayEnvironmentProvider: RelayEnvironmentProvider,
81
94
 
82
95
  ProfilerContext: ProfilerContext,
83
96
 
84
- fetchQuery: RelayRuntime.fetchQuery,
97
+ fetchQuery,
85
98
 
86
99
  loadQuery: loadQuery,
87
100
  loadEntryPoint: loadEntryPoint,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-2ae7e5a9
2
+ * Relay v0.0.0-main-49b74be8
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js.flow CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
  'use strict';
17
17
 
18
+ /* eslint relay-internal/esm-compatible-cjs: error */
19
+
18
20
  const ReactRelayContext = require('./ReactRelayContext');
19
21
  const ReactRelayFragmentContainer = require('./ReactRelayFragmentContainer');
20
22
  const ReactRelayLocalQueryRenderer = require('./ReactRelayLocalQueryRenderer');
@@ -84,31 +86,49 @@ export type {
84
86
  FetchPolicy,
85
87
  } from 'relay-runtime';
86
88
 
89
+ const {
90
+ ConnectionHandler,
91
+ MutationTypes,
92
+ RangeOperations,
93
+ applyOptimisticMutation,
94
+ commitLocalUpdate,
95
+ commitMutation,
96
+ fetchQuery_DEPRECATED,
97
+ graphql,
98
+ readInlineData,
99
+ requestSubscription,
100
+ fetchQuery,
101
+ } = RelayRuntime;
102
+
103
+ const createFragmentContainer = ReactRelayFragmentContainer.createContainer;
104
+ const createPaginationContainer = ReactRelayPaginationContainer.createContainer;
105
+ const createRefetchContainer = ReactRelayRefetchContainer.createContainer;
106
+
87
107
  /**
88
108
  * The public interface to react-relay.
89
109
  * Currently contains both Relay Hooks and legacy Container APIs.
90
110
  * Will eventually only export the interface from ./hooks.js.
91
111
  */
92
112
  module.exports = {
93
- ConnectionHandler: RelayRuntime.ConnectionHandler,
113
+ ConnectionHandler,
94
114
  QueryRenderer: ReactRelayQueryRenderer,
95
115
  LocalQueryRenderer: ReactRelayLocalQueryRenderer,
96
116
 
97
- MutationTypes: RelayRuntime.MutationTypes,
98
- RangeOperations: RelayRuntime.RangeOperations,
117
+ MutationTypes,
118
+ RangeOperations,
99
119
 
100
120
  ReactRelayContext,
101
121
 
102
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
103
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
104
- commitMutation: RelayRuntime.commitMutation,
105
- createFragmentContainer: ReactRelayFragmentContainer.createContainer,
106
- createPaginationContainer: ReactRelayPaginationContainer.createContainer,
107
- createRefetchContainer: ReactRelayRefetchContainer.createContainer,
108
- fetchQuery_DEPRECATED: RelayRuntime.fetchQuery_DEPRECATED,
109
- graphql: RelayRuntime.graphql,
110
- readInlineData: RelayRuntime.readInlineData,
111
- requestSubscription: RelayRuntime.requestSubscription,
122
+ applyOptimisticMutation,
123
+ commitLocalUpdate,
124
+ commitMutation,
125
+ createFragmentContainer,
126
+ createPaginationContainer,
127
+ createRefetchContainer,
128
+ fetchQuery_DEPRECATED,
129
+ graphql,
130
+ readInlineData,
131
+ requestSubscription,
112
132
 
113
133
  // Relay Hooks
114
134
  EntryPointContainer: EntryPointContainer,
@@ -116,7 +136,7 @@ module.exports = {
116
136
 
117
137
  ProfilerContext: ProfilerContext,
118
138
 
119
- fetchQuery: RelayRuntime.fetchQuery,
139
+ fetchQuery,
120
140
 
121
141
  loadQuery: loadQuery,
122
142
  loadEntryPoint: loadEntryPoint,
package/legacy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-2ae7e5a9
2
+ * Relay v0.0.0-main-49b74be8
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/legacy.js.flow CHANGED
@@ -11,6 +11,8 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ /* eslint relay-internal/esm-compatible-cjs: error */
15
+
14
16
  const ReactRelayContext = require('./ReactRelayContext');
15
17
  const ReactRelayFragmentContainer = require('./ReactRelayFragmentContainer');
16
18
  const ReactRelayLocalQueryRenderer = require('./ReactRelayLocalQueryRenderer');
@@ -47,28 +49,45 @@ export type {
47
49
  FetchPolicy,
48
50
  } from 'relay-runtime';
49
51
 
52
+ const {
53
+ ConnectionHandler,
54
+ MutationTypes,
55
+ RangeOperations,
56
+ applyOptimisticMutation,
57
+ commitLocalUpdate,
58
+ commitMutation,
59
+ fetchQuery_DEPRECATED,
60
+ graphql,
61
+ readInlineData,
62
+ requestSubscription,
63
+ } = RelayRuntime;
64
+
65
+ const createFragmentContainer = ReactRelayFragmentContainer.createContainer;
66
+ const createPaginationContainer = ReactRelayPaginationContainer.createContainer;
67
+ const createRefetchContainer = ReactRelayRefetchContainer.createContainer;
68
+
50
69
  /**
51
70
  * Legacy react-relay exports.
52
71
  * Should prefer using interface defined in ./hooks.js
53
72
  */
54
73
  module.exports = {
55
- ConnectionHandler: RelayRuntime.ConnectionHandler,
74
+ ConnectionHandler,
56
75
  QueryRenderer: ReactRelayQueryRenderer,
57
76
  LocalQueryRenderer: ReactRelayLocalQueryRenderer,
58
77
 
59
- MutationTypes: RelayRuntime.MutationTypes,
60
- RangeOperations: RelayRuntime.RangeOperations,
78
+ MutationTypes,
79
+ RangeOperations,
61
80
 
62
81
  ReactRelayContext,
63
82
 
64
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
65
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
66
- commitMutation: RelayRuntime.commitMutation,
67
- createFragmentContainer: ReactRelayFragmentContainer.createContainer,
68
- createPaginationContainer: ReactRelayPaginationContainer.createContainer,
69
- createRefetchContainer: ReactRelayRefetchContainer.createContainer,
70
- fetchQuery_DEPRECATED: RelayRuntime.fetchQuery_DEPRECATED,
71
- graphql: RelayRuntime.graphql,
72
- readInlineData: RelayRuntime.readInlineData,
73
- requestSubscription: RelayRuntime.requestSubscription,
83
+ applyOptimisticMutation,
84
+ commitLocalUpdate,
85
+ commitMutation,
86
+ createFragmentContainer,
87
+ createPaginationContainer,
88
+ createRefetchContainer,
89
+ fetchQuery_DEPRECATED,
90
+ graphql,
91
+ readInlineData,
92
+ requestSubscription,
74
93
  };
package/lib/hooks.js CHANGED
@@ -18,18 +18,26 @@ var useRelayEnvironment = require('./relay-hooks/useRelayEnvironment');
18
18
  var useSubscribeToInvalidationState = require('./relay-hooks/useSubscribeToInvalidationState');
19
19
  var useSubscription = require('./relay-hooks/useSubscription');
20
20
  var RelayRuntime = require('relay-runtime');
21
+ var ConnectionHandler = RelayRuntime.ConnectionHandler,
22
+ applyOptimisticMutation = RelayRuntime.applyOptimisticMutation,
23
+ commitLocalUpdate = RelayRuntime.commitLocalUpdate,
24
+ commitMutation = RelayRuntime.commitMutation,
25
+ graphql = RelayRuntime.graphql,
26
+ readInlineData = RelayRuntime.readInlineData,
27
+ requestSubscription = RelayRuntime.requestSubscription,
28
+ fetchQuery = RelayRuntime.fetchQuery;
21
29
  module.exports = {
22
- ConnectionHandler: RelayRuntime.ConnectionHandler,
23
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
24
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
25
- commitMutation: RelayRuntime.commitMutation,
26
- graphql: RelayRuntime.graphql,
27
- readInlineData: RelayRuntime.readInlineData,
28
- requestSubscription: RelayRuntime.requestSubscription,
30
+ ConnectionHandler: ConnectionHandler,
31
+ applyOptimisticMutation: applyOptimisticMutation,
32
+ commitLocalUpdate: commitLocalUpdate,
33
+ commitMutation: commitMutation,
34
+ graphql: graphql,
35
+ readInlineData: readInlineData,
36
+ requestSubscription: requestSubscription,
29
37
  EntryPointContainer: EntryPointContainer,
30
38
  RelayEnvironmentProvider: RelayEnvironmentProvider,
31
39
  ProfilerContext: ProfilerContext,
32
- fetchQuery: RelayRuntime.fetchQuery,
40
+ fetchQuery: fetchQuery,
33
41
  loadQuery: loadQuery,
34
42
  loadEntryPoint: loadEntryPoint,
35
43
  useFragment: useFragment,
package/lib/index.js CHANGED
@@ -26,27 +26,41 @@ var useRelayEnvironment = require('./relay-hooks/useRelayEnvironment');
26
26
  var useSubscribeToInvalidationState = require('./relay-hooks/useSubscribeToInvalidationState');
27
27
  var useSubscription = require('./relay-hooks/useSubscription');
28
28
  var RelayRuntime = require('relay-runtime');
29
+ var ConnectionHandler = RelayRuntime.ConnectionHandler,
30
+ MutationTypes = RelayRuntime.MutationTypes,
31
+ RangeOperations = RelayRuntime.RangeOperations,
32
+ applyOptimisticMutation = RelayRuntime.applyOptimisticMutation,
33
+ commitLocalUpdate = RelayRuntime.commitLocalUpdate,
34
+ commitMutation = RelayRuntime.commitMutation,
35
+ fetchQuery_DEPRECATED = RelayRuntime.fetchQuery_DEPRECATED,
36
+ graphql = RelayRuntime.graphql,
37
+ readInlineData = RelayRuntime.readInlineData,
38
+ requestSubscription = RelayRuntime.requestSubscription,
39
+ fetchQuery = RelayRuntime.fetchQuery;
40
+ var createFragmentContainer = ReactRelayFragmentContainer.createContainer;
41
+ var createPaginationContainer = ReactRelayPaginationContainer.createContainer;
42
+ var createRefetchContainer = ReactRelayRefetchContainer.createContainer;
29
43
  module.exports = {
30
- ConnectionHandler: RelayRuntime.ConnectionHandler,
44
+ ConnectionHandler: ConnectionHandler,
31
45
  QueryRenderer: ReactRelayQueryRenderer,
32
46
  LocalQueryRenderer: ReactRelayLocalQueryRenderer,
33
- MutationTypes: RelayRuntime.MutationTypes,
34
- RangeOperations: RelayRuntime.RangeOperations,
47
+ MutationTypes: MutationTypes,
48
+ RangeOperations: RangeOperations,
35
49
  ReactRelayContext: ReactRelayContext,
36
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
37
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
38
- commitMutation: RelayRuntime.commitMutation,
39
- createFragmentContainer: ReactRelayFragmentContainer.createContainer,
40
- createPaginationContainer: ReactRelayPaginationContainer.createContainer,
41
- createRefetchContainer: ReactRelayRefetchContainer.createContainer,
42
- fetchQuery_DEPRECATED: RelayRuntime.fetchQuery_DEPRECATED,
43
- graphql: RelayRuntime.graphql,
44
- readInlineData: RelayRuntime.readInlineData,
45
- requestSubscription: RelayRuntime.requestSubscription,
50
+ applyOptimisticMutation: applyOptimisticMutation,
51
+ commitLocalUpdate: commitLocalUpdate,
52
+ commitMutation: commitMutation,
53
+ createFragmentContainer: createFragmentContainer,
54
+ createPaginationContainer: createPaginationContainer,
55
+ createRefetchContainer: createRefetchContainer,
56
+ fetchQuery_DEPRECATED: fetchQuery_DEPRECATED,
57
+ graphql: graphql,
58
+ readInlineData: readInlineData,
59
+ requestSubscription: requestSubscription,
46
60
  EntryPointContainer: EntryPointContainer,
47
61
  RelayEnvironmentProvider: RelayEnvironmentProvider,
48
62
  ProfilerContext: ProfilerContext,
49
- fetchQuery: RelayRuntime.fetchQuery,
63
+ fetchQuery: fetchQuery,
50
64
  loadQuery: loadQuery,
51
65
  loadEntryPoint: loadEntryPoint,
52
66
  useClientQuery: useClientQuery,
package/lib/legacy.js CHANGED
@@ -7,21 +7,34 @@ var ReactRelayPaginationContainer = require('./ReactRelayPaginationContainer');
7
7
  var ReactRelayQueryRenderer = require('./ReactRelayQueryRenderer');
8
8
  var ReactRelayRefetchContainer = require('./ReactRelayRefetchContainer');
9
9
  var RelayRuntime = require('relay-runtime');
10
+ var ConnectionHandler = RelayRuntime.ConnectionHandler,
11
+ MutationTypes = RelayRuntime.MutationTypes,
12
+ RangeOperations = RelayRuntime.RangeOperations,
13
+ applyOptimisticMutation = RelayRuntime.applyOptimisticMutation,
14
+ commitLocalUpdate = RelayRuntime.commitLocalUpdate,
15
+ commitMutation = RelayRuntime.commitMutation,
16
+ fetchQuery_DEPRECATED = RelayRuntime.fetchQuery_DEPRECATED,
17
+ graphql = RelayRuntime.graphql,
18
+ readInlineData = RelayRuntime.readInlineData,
19
+ requestSubscription = RelayRuntime.requestSubscription;
20
+ var createFragmentContainer = ReactRelayFragmentContainer.createContainer;
21
+ var createPaginationContainer = ReactRelayPaginationContainer.createContainer;
22
+ var createRefetchContainer = ReactRelayRefetchContainer.createContainer;
10
23
  module.exports = {
11
- ConnectionHandler: RelayRuntime.ConnectionHandler,
24
+ ConnectionHandler: ConnectionHandler,
12
25
  QueryRenderer: ReactRelayQueryRenderer,
13
26
  LocalQueryRenderer: ReactRelayLocalQueryRenderer,
14
- MutationTypes: RelayRuntime.MutationTypes,
15
- RangeOperations: RelayRuntime.RangeOperations,
27
+ MutationTypes: MutationTypes,
28
+ RangeOperations: RangeOperations,
16
29
  ReactRelayContext: ReactRelayContext,
17
- applyOptimisticMutation: RelayRuntime.applyOptimisticMutation,
18
- commitLocalUpdate: RelayRuntime.commitLocalUpdate,
19
- commitMutation: RelayRuntime.commitMutation,
20
- createFragmentContainer: ReactRelayFragmentContainer.createContainer,
21
- createPaginationContainer: ReactRelayPaginationContainer.createContainer,
22
- createRefetchContainer: ReactRelayRefetchContainer.createContainer,
23
- fetchQuery_DEPRECATED: RelayRuntime.fetchQuery_DEPRECATED,
24
- graphql: RelayRuntime.graphql,
25
- readInlineData: RelayRuntime.readInlineData,
26
- requestSubscription: RelayRuntime.requestSubscription
30
+ applyOptimisticMutation: applyOptimisticMutation,
31
+ commitLocalUpdate: commitLocalUpdate,
32
+ commitMutation: commitMutation,
33
+ createFragmentContainer: createFragmentContainer,
34
+ createPaginationContainer: createPaginationContainer,
35
+ createRefetchContainer: createRefetchContainer,
36
+ fetchQuery_DEPRECATED: fetchQuery_DEPRECATED,
37
+ graphql: graphql,
38
+ readInlineData: readInlineData,
39
+ requestSubscription: requestSubscription
27
40
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-relay",
3
3
  "description": "A framework for building GraphQL-driven React applications.",
4
- "version": "0.0.0-main-2ae7e5a9",
4
+ "version": "0.0.0-main-49b74be8",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay",
@@ -20,7 +20,7 @@
20
20
  "fbjs": "^3.0.2",
21
21
  "invariant": "^2.2.4",
22
22
  "nullthrows": "^1.1.1",
23
- "relay-runtime": "0.0.0-main-2ae7e5a9"
23
+ "relay-runtime": "0.0.0-main-49b74be8"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.9.0 || ^17 || ^18 || ^19"
@@ -29,5 +29,6 @@
29
29
  "": "./"
30
30
  },
31
31
  "main": "index.js",
32
+ "types": "index.d.ts",
32
33
  "haste_commonjs": true
33
34
  }