@apollo/client 3.9.0-alpha.2 → 3.9.0-alpha.4
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/apollo-client.cjs +136 -81
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +47 -11
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +47 -11
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +35 -0
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +2 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.js +1 -1
- package/cache/inmemory/policies.js +4 -4
- package/cache/inmemory/readFromStore.js +2 -2
- package/cache/inmemory/writeToStore.js +4 -4
- package/core/ApolloClient.d.ts +2 -0
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +12 -4
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.js +2 -2
- package/core/ObservableQuery.js +5 -5
- package/core/QueryManager.d.ts +4 -2
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +13 -12
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +32 -23
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +32 -23
- package/dev/dev.cjs +98 -83
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +98 -83
- package/dev/loadErrorMessageHandler.js +1 -1
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/invariantErrorCodes.js +96 -81
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/http.cjs +3 -3
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +3 -3
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +1 -1
- package/package.json +27 -25
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +7 -2
- package/react/cache/QueryReference.js.map +1 -1
- package/react/components/Mutation.d.ts +2 -2
- package/react/components/Mutation.d.ts.map +1 -1
- package/react/components/Mutation.js.map +1 -1
- package/react/components/Query.d.ts +2 -2
- package/react/components/Query.d.ts.map +1 -1
- package/react/components/Query.js.map +1 -1
- package/react/components/Subscription.d.ts +2 -2
- package/react/components/Subscription.d.ts.map +1 -1
- package/react/components/Subscription.js.map +1 -1
- package/react/components/types.d.ts +4 -4
- package/react/components/types.d.ts.map +1 -1
- package/react/components/types.js.map +1 -1
- package/react/context/ApolloConsumer.d.ts +3 -3
- package/react/context/ApolloConsumer.d.ts.map +1 -1
- package/react/context/ApolloConsumer.js +2 -2
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +2 -2
- package/react/context/ApolloContext.d.ts.map +1 -1
- package/react/context/ApolloContext.js +2 -2
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +3 -3
- package/react/context/ApolloProvider.d.ts.map +1 -1
- package/react/context/ApolloProvider.js +2 -2
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs +4 -4
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +4 -4
- package/react/hoc/graphql.d.ts +2 -2
- package/react/hoc/graphql.d.ts.map +1 -1
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts +2 -1
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +2 -2
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs +3 -3
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +3 -3
- package/react/hoc/mutation-hoc.d.ts +2 -2
- package/react/hoc/mutation-hoc.d.ts.map +1 -1
- package/react/hoc/mutation-hoc.js +1 -1
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.d.ts +2 -2
- package/react/hoc/query-hoc.d.ts.map +1 -1
- package/react/hoc/query-hoc.js +1 -1
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.d.ts +2 -2
- package/react/hoc/subscription-hoc.d.ts.map +1 -1
- package/react/hoc/subscription-hoc.js +1 -1
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hoc/withApollo.d.ts +2 -2
- package/react/hoc/withApollo.d.ts.map +1 -1
- package/react/hoc/withApollo.js +2 -2
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs +16 -11
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +16 -11
- package/react/hooks/index.d.ts +1 -0
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/internal/__use.js +1 -1
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +1 -1
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +2 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/useApolloClient.js +2 -2
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.js +1 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.js +1 -1
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.js +1 -1
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.js +1 -1
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.js +2 -2
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useReactiveVar.js +1 -1
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +7 -4
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +2 -2
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +3 -3
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseQuery.js +3 -3
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +2 -2
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/parser/index.js +5 -5
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/ssr/RenderPromises.d.ts +3 -3
- package/react/ssr/RenderPromises.d.ts.map +1 -1
- package/react/ssr/RenderPromises.js.map +1 -1
- package/react/ssr/getDataFromTree.d.ts +4 -4
- package/react/ssr/getDataFromTree.d.ts.map +1 -1
- package/react/ssr/getDataFromTree.js +1 -1
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/renderToStringWithData.d.ts +2 -2
- package/react/ssr/renderToStringWithData.d.ts.map +1 -1
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/ssr.cjs +1 -1
- package/react/ssr/ssr.cjs.map +1 -1
- package/react/ssr/ssr.cjs.native.js +1 -1
- package/react/types/types.d.ts +2 -2
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +2 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +2 -2
- package/testing/core/mocking/mockLink.js +2 -2
- package/testing/react/MockedProvider.d.ts +1 -0
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +2 -1
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +2 -1
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +2 -1
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +4 -4
- package/utilities/graphql/fragments.js +3 -3
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/print.d.ts +4 -2
- package/utilities/graphql/print.d.ts.map +1 -1
- package/utilities/graphql/print.js +8 -3
- package/utilities/graphql/print.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts +5 -0
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.d.ts +1 -1
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js.map +1 -1
- package/utilities/subscriptions/relay/index.d.ts +6 -0
- package/utilities/subscriptions/relay/index.d.ts.map +1 -0
- package/utilities/subscriptions/relay/index.js +43 -0
- package/utilities/subscriptions/relay/index.js.map +1 -0
- package/utilities/subscriptions/relay/package.json +8 -0
- package/utilities/subscriptions/relay/relay.cjs +368 -0
- package/utilities/subscriptions/relay/relay.cjs.map +1 -0
- package/utilities/subscriptions/relay/relay.cjs.native.js +368 -0
- package/utilities/subscriptions/shared.d.ts +9 -0
- package/utilities/subscriptions/shared.d.ts.map +1 -0
- package/utilities/subscriptions/shared.js +7 -0
- package/utilities/subscriptions/shared.js.map +1 -0
- package/utilities/subscriptions/urql/index.d.ts +7 -0
- package/utilities/subscriptions/urql/index.d.ts.map +1 -0
- package/utilities/subscriptions/urql/index.js +40 -0
- package/utilities/subscriptions/urql/index.js.map +1 -0
- package/utilities/subscriptions/urql/package.json +8 -0
- package/utilities/subscriptions/urql/urql.cjs +364 -0
- package/utilities/subscriptions/urql/urql.cjs.map +1 -0
- package/utilities/subscriptions/urql/urql.cjs.native.js +364 -0
- package/utilities/utilities.cjs +27 -22
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +27 -22
- package/version.js +1 -1
package/dev/dev.cjs
CHANGED
|
@@ -15,45 +15,45 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
15
15
|
message: "store.merge expects a string ID"
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
4: {
|
|
19
19
|
file: "@apollo/client/cache/inmemory/key-extractor.js",
|
|
20
20
|
condition: "extracted !== void 0",
|
|
21
21
|
message: "Missing field '%s' while extracting keyFields from %s"
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
5: {
|
|
25
25
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
26
26
|
condition: "!old || old === which",
|
|
27
27
|
message: "Cannot change root %s __typename more than once"
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
8: {
|
|
31
31
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
32
32
|
message: "Cannot automatically merge arrays"
|
|
33
33
|
},
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
9: {
|
|
36
36
|
file: "@apollo/client/cache/inmemory/readFromStore.js",
|
|
37
37
|
message: "No fragment named %s"
|
|
38
38
|
},
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
10: {
|
|
41
41
|
file: "@apollo/client/cache/inmemory/readFromStore.js",
|
|
42
42
|
condition: "!isReference(value)",
|
|
43
43
|
message: "Missing selection set for object of type %s returned for query field %s"
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
11: {
|
|
47
47
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
48
48
|
message: "Could not identify object %s"
|
|
49
49
|
},
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
13: {
|
|
52
52
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
53
53
|
message: "No fragment named %s"
|
|
54
54
|
},
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
15: {
|
|
57
57
|
file: "@apollo/client/core/ApolloClient.js",
|
|
58
58
|
|
|
59
59
|
message: "To initialize Apollo Client, you must specify a 'cache' property " +
|
|
@@ -61,7 +61,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
61
61
|
"For more information, please visit: https://go.apollo.dev/c/docs"
|
|
62
62
|
},
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
16: {
|
|
65
65
|
file: "@apollo/client/core/ApolloClient.js",
|
|
66
66
|
condition: "options.fetchPolicy !== \"cache-and-network\"",
|
|
67
67
|
|
|
@@ -71,42 +71,42 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
71
71
|
"using a different fetchPolicy, such as cache-first or network-only."
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
18: {
|
|
75
75
|
file: "@apollo/client/core/LocalState.js",
|
|
76
76
|
condition: "fragment",
|
|
77
77
|
message: "No fragment named %s"
|
|
78
78
|
},
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
19: {
|
|
81
81
|
file: "@apollo/client/core/LocalState.js",
|
|
82
82
|
condition: "fragment",
|
|
83
83
|
message: "No fragment named %s"
|
|
84
84
|
},
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
22: {
|
|
87
87
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
88
88
|
condition: "pollInterval",
|
|
89
89
|
message: "Attempted to start a polling query without a polling interval."
|
|
90
90
|
},
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
25: {
|
|
93
93
|
file: "@apollo/client/core/QueryManager.js",
|
|
94
94
|
message: "QueryManager stopped while query was in flight"
|
|
95
95
|
},
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
26: {
|
|
98
98
|
file: "@apollo/client/core/QueryManager.js",
|
|
99
99
|
condition: "mutation",
|
|
100
100
|
message: "mutation option is required. You must specify your GraphQL document in the mutation option."
|
|
101
101
|
},
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
27: {
|
|
104
104
|
file: "@apollo/client/core/QueryManager.js",
|
|
105
105
|
condition: "fetchPolicy === \"network-only\" || fetchPolicy === \"no-cache\"",
|
|
106
106
|
message: "Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."
|
|
107
107
|
},
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
28: {
|
|
110
110
|
file: "@apollo/client/core/QueryManager.js",
|
|
111
111
|
condition: "options.query",
|
|
112
112
|
|
|
@@ -114,45 +114,45 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
114
114
|
"in the query option."
|
|
115
115
|
},
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
29: {
|
|
118
118
|
file: "@apollo/client/core/QueryManager.js",
|
|
119
119
|
condition: "options.query.kind === \"Document\"",
|
|
120
120
|
message: 'You must wrap the query string in a "gql" tag.'
|
|
121
121
|
},
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
30: {
|
|
124
124
|
file: "@apollo/client/core/QueryManager.js",
|
|
125
125
|
condition: "!options.returnPartialData",
|
|
126
126
|
message: "returnPartialData option only supported on watchQuery."
|
|
127
127
|
},
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
31: {
|
|
130
130
|
file: "@apollo/client/core/QueryManager.js",
|
|
131
131
|
condition: "!options.pollInterval",
|
|
132
132
|
message: "pollInterval option only supported on watchQuery."
|
|
133
133
|
},
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
32: {
|
|
136
136
|
file: "@apollo/client/core/QueryManager.js",
|
|
137
137
|
message: "Store reset while query was in flight (not completed in link chain)"
|
|
138
138
|
},
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
36: {
|
|
141
141
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
142
142
|
message: "request is not implemented"
|
|
143
143
|
},
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
37: {
|
|
146
146
|
file: "@apollo/client/link/http/checkFetcher.js",
|
|
147
147
|
message: "\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "
|
|
148
148
|
},
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
39: {
|
|
151
151
|
file: "@apollo/client/link/http/serializeFetchParameter.js",
|
|
152
152
|
message: "Network request failed. %s is not serializable: %s"
|
|
153
153
|
},
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
40: {
|
|
156
156
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
157
157
|
condition: "options &&\n (typeof options.sha256 === \"function\" ||\n typeof options.generateHash === \"function\")",
|
|
158
158
|
|
|
@@ -161,18 +161,18 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
161
161
|
"parameter."
|
|
162
162
|
},
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
41: {
|
|
165
165
|
file: "@apollo/client/link/persisted-queries/index.js",
|
|
166
166
|
condition: "forward",
|
|
167
167
|
message: "PersistedQueryLink cannot be the last link in the chain."
|
|
168
168
|
},
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
43: {
|
|
171
171
|
file: "@apollo/client/link/utils/validateOperation.js",
|
|
172
172
|
message: "illegal argument: %s"
|
|
173
173
|
},
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
44: {
|
|
176
176
|
file: "@apollo/client/react/context/ApolloConsumer.js",
|
|
177
177
|
condition: "context && context.client",
|
|
178
178
|
|
|
@@ -180,7 +180,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
180
180
|
"Wrap the root component in an <ApolloProvider>."
|
|
181
181
|
},
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
45: {
|
|
184
184
|
file: "@apollo/client/react/context/ApolloContext.js",
|
|
185
185
|
condition: "\"createContext\" in React",
|
|
186
186
|
|
|
@@ -190,7 +190,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
190
190
|
"For more information, see https://nextjs.org/docs/getting-started/react-essentials#client-components"
|
|
191
191
|
},
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
46: {
|
|
194
194
|
file: "@apollo/client/react/context/ApolloProvider.js",
|
|
195
195
|
condition: "context.client",
|
|
196
196
|
|
|
@@ -198,7 +198,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
198
198
|
'sure you pass in your client via the "client" prop.'
|
|
199
199
|
},
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
47: {
|
|
202
202
|
file: "@apollo/client/react/hoc/hoc-utils.js",
|
|
203
203
|
condition: "this.withRef",
|
|
204
204
|
|
|
@@ -206,7 +206,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
206
206
|
"{ withRef: true } in the options"
|
|
207
207
|
},
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
48: {
|
|
210
210
|
file: "@apollo/client/react/hoc/withApollo.js",
|
|
211
211
|
condition: "operationOptions.withRef",
|
|
212
212
|
|
|
@@ -214,7 +214,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
214
214
|
"{ withRef: true } in the options"
|
|
215
215
|
},
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
49: {
|
|
218
218
|
file: "@apollo/client/react/hooks/useApolloClient.js",
|
|
219
219
|
condition: "!!client",
|
|
220
220
|
|
|
@@ -223,7 +223,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
223
223
|
"instance in via options."
|
|
224
224
|
},
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
51: {
|
|
227
227
|
file: "@apollo/client/react/hooks/useReadQuery.js",
|
|
228
228
|
condition: "internalQueryRef.promiseCache",
|
|
229
229
|
|
|
@@ -232,13 +232,13 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
232
232
|
"Please ensure you are passing the `queryRef` returned from `useBackgroundQuery`."
|
|
233
233
|
},
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
56: {
|
|
236
236
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
237
237
|
condition: "supportedFetchPolicies.includes(fetchPolicy)",
|
|
238
238
|
message: "The fetch policy `%s` is not supported with suspense."
|
|
239
239
|
},
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
59: {
|
|
242
242
|
file: "@apollo/client/react/parser/index.js",
|
|
243
243
|
condition: "!!document && !!document.kind",
|
|
244
244
|
|
|
@@ -247,7 +247,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
247
247
|
"to convert your operation into a document"
|
|
248
248
|
},
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
60: {
|
|
251
251
|
file: "@apollo/client/react/parser/index.js",
|
|
252
252
|
condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
|
|
253
253
|
|
|
@@ -255,7 +255,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
255
255
|
"You must include a query, subscription or mutation as well"
|
|
256
256
|
},
|
|
257
257
|
|
|
258
|
-
|
|
258
|
+
61: {
|
|
259
259
|
file: "@apollo/client/react/parser/index.js",
|
|
260
260
|
condition: "queries.length + mutations.length + subscriptions.length <= 1",
|
|
261
261
|
|
|
@@ -265,7 +265,7 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
265
265
|
"You can use 'compose' to join multiple operation types to a component"
|
|
266
266
|
},
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
62: {
|
|
269
269
|
file: "@apollo/client/react/parser/index.js",
|
|
270
270
|
condition: "definitions.length === 1",
|
|
271
271
|
|
|
@@ -274,120 +274,120 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
274
274
|
"You can use 'compose' to join multiple operation types to a component"
|
|
275
275
|
},
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
63: {
|
|
278
278
|
file: "@apollo/client/react/parser/index.js",
|
|
279
279
|
condition: "operation.type === type",
|
|
280
280
|
message: "Running a %s requires a graphql " + "%s, but a %s was used instead."
|
|
281
281
|
},
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
64: {
|
|
284
284
|
file: "@apollo/client/testing/core/mocking/mockLink.js",
|
|
285
285
|
condition: "queryWithoutConnection",
|
|
286
286
|
message: "query is required"
|
|
287
287
|
},
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
65: {
|
|
290
290
|
file: "@apollo/client/testing/core/mocking/mockLink.js",
|
|
291
291
|
condition: "mockedResponse.maxUsageCount > 0",
|
|
292
292
|
message: "Mock response maxUsageCount must be greater than 0, %s given"
|
|
293
293
|
},
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
66: {
|
|
296
296
|
file: "@apollo/client/utilities/graphql/DocumentTransform.js",
|
|
297
297
|
condition: "Array.isArray(cacheKeys)",
|
|
298
298
|
message: "`getCacheKey` must return an array or undefined"
|
|
299
299
|
},
|
|
300
300
|
|
|
301
|
-
|
|
301
|
+
67: {
|
|
302
302
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
303
303
|
condition: "evaledValue !== void 0",
|
|
304
304
|
message: "Invalid variable referenced in @%s directive."
|
|
305
305
|
},
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
68: {
|
|
308
308
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
309
309
|
condition: "directiveArguments && directiveArguments.length === 1",
|
|
310
310
|
message: "Incorrect number of arguments for the @%s directive."
|
|
311
311
|
},
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
69: {
|
|
314
314
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
315
315
|
condition: "ifArgument.name && ifArgument.name.value === \"if\"",
|
|
316
316
|
message: "Invalid argument for the @%s directive."
|
|
317
317
|
},
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
70: {
|
|
320
320
|
file: "@apollo/client/utilities/graphql/directives.js",
|
|
321
321
|
condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",
|
|
322
322
|
message: "Argument for the @%s directive must be a variable or a boolean value."
|
|
323
323
|
},
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
71: {
|
|
326
326
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
327
327
|
|
|
328
328
|
message: "Found a %s operation%s. " +
|
|
329
329
|
"No operations are allowed when using a fragment as a query. Only fragments are allowed."
|
|
330
330
|
},
|
|
331
331
|
|
|
332
|
-
|
|
332
|
+
72: {
|
|
333
333
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
334
334
|
condition: "fragments.length === 1",
|
|
335
335
|
message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
|
|
336
336
|
},
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
73: {
|
|
339
339
|
file: "@apollo/client/utilities/graphql/fragments.js",
|
|
340
340
|
condition: "fragment",
|
|
341
341
|
message: "No fragment named %s"
|
|
342
342
|
},
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
74: {
|
|
345
345
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
346
346
|
condition: "doc && doc.kind === \"Document\"",
|
|
347
347
|
message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
|
|
348
348
|
},
|
|
349
349
|
|
|
350
|
-
|
|
350
|
+
75: {
|
|
351
351
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
352
352
|
message: "Schema type definitions not allowed in queries. Found: \"%s\""
|
|
353
353
|
},
|
|
354
354
|
|
|
355
|
-
|
|
355
|
+
76: {
|
|
356
356
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
357
357
|
condition: "operations.length <= 1",
|
|
358
358
|
message: "Ambiguous GraphQL document: contains %s operations"
|
|
359
359
|
},
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
77: {
|
|
362
362
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
363
363
|
condition: "queryDef && queryDef.operation === \"query\"",
|
|
364
364
|
message: "Must contain a query definition."
|
|
365
365
|
},
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
78: {
|
|
368
368
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
369
369
|
condition: "doc.kind === \"Document\"",
|
|
370
370
|
message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
|
|
371
371
|
},
|
|
372
372
|
|
|
373
|
-
|
|
373
|
+
79: {
|
|
374
374
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
375
375
|
condition: "doc.definitions.length <= 1",
|
|
376
376
|
message: "Fragment must have exactly one definition."
|
|
377
377
|
},
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
80: {
|
|
380
380
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
381
381
|
condition: "fragmentDef.kind === \"FragmentDefinition\"",
|
|
382
382
|
message: "Must be a fragment definition."
|
|
383
383
|
},
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
81: {
|
|
386
386
|
file: "@apollo/client/utilities/graphql/getFromAST.js",
|
|
387
387
|
message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
|
|
388
388
|
},
|
|
389
389
|
|
|
390
|
-
|
|
390
|
+
82: {
|
|
391
391
|
file: "@apollo/client/utilities/graphql/storeUtils.js",
|
|
392
392
|
|
|
393
393
|
message: "The inline argument \"%s\" of kind \"%s\"" +
|
|
@@ -397,12 +397,12 @@ const errorCodes = // This file is used by the error message display website and
|
|
|
397
397
|
};
|
|
398
398
|
|
|
399
399
|
const devDebug = {
|
|
400
|
-
|
|
400
|
+
17: {
|
|
401
401
|
file: "@apollo/client/core/ApolloClient.js",
|
|
402
402
|
message: "In client.refetchQueries, Promise.all promise rejected with error %o"
|
|
403
403
|
},
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
24: {
|
|
406
406
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
407
407
|
message: "Missing cache result fields: %o"
|
|
408
408
|
}
|
|
@@ -411,82 +411,97 @@ const devDebug = {
|
|
|
411
411
|
const devLog = {};
|
|
412
412
|
|
|
413
413
|
const devWarn = {
|
|
414
|
-
|
|
414
|
+
2: {
|
|
415
|
+
file: "@apollo/client/cache/inmemory/entityStore.js",
|
|
416
|
+
|
|
417
|
+
message: "cache.modify: You are trying to write a Reference that is not part of the store: %o\n" +
|
|
418
|
+
"Please make sure to set the `mergeIntoStore` parameter to `true` when creating a Reference that is not part of the store yet:\n" +
|
|
419
|
+
"`toReference(object, true)`"
|
|
420
|
+
},
|
|
421
|
+
|
|
422
|
+
3: {
|
|
423
|
+
file: "@apollo/client/cache/inmemory/entityStore.js",
|
|
424
|
+
|
|
425
|
+
message: "cache.modify: Writing an array with a mix of both References and Objects will not result in the Objects being normalized correctly.\n" +
|
|
426
|
+
"Please convert the object instance %o to a Reference before writing it to the cache by calling `toReference(object, true)`."
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
6: {
|
|
415
430
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
416
431
|
message: "Inferring subtype %s of supertype %s"
|
|
417
432
|
},
|
|
418
433
|
|
|
419
|
-
|
|
434
|
+
7: {
|
|
420
435
|
file: "@apollo/client/cache/inmemory/policies.js",
|
|
421
436
|
message: "Undefined 'from' passed to readField with arguments %s"
|
|
422
437
|
},
|
|
423
438
|
|
|
424
|
-
|
|
439
|
+
14: {
|
|
425
440
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
426
441
|
message: "Cache data may be lost when replacing the %s field of a %s object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), %sdefine a custom merge function for the %s field, so InMemoryCache can safely merge these objects:\n\n existing: %s\n incoming: %s\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"
|
|
427
442
|
},
|
|
428
443
|
|
|
429
|
-
|
|
444
|
+
20: {
|
|
430
445
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
431
446
|
message: "Called refetch(%o) for query %o, which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"
|
|
432
447
|
},
|
|
433
448
|
|
|
434
|
-
|
|
449
|
+
33: {
|
|
435
450
|
file: "@apollo/client/core/QueryManager.js",
|
|
436
451
|
message: "Unknown query named \"%s\" requested in refetchQueries options.include array"
|
|
437
452
|
},
|
|
438
453
|
|
|
439
|
-
|
|
454
|
+
34: {
|
|
440
455
|
file: "@apollo/client/core/QueryManager.js",
|
|
441
456
|
message: "Unknown query %s requested in refetchQueries options.include array"
|
|
442
457
|
},
|
|
443
458
|
|
|
444
|
-
|
|
459
|
+
35: {
|
|
445
460
|
file: "@apollo/client/link/core/ApolloLink.js",
|
|
446
461
|
message: "You are calling concat on a terminating link, which will have no effect %o"
|
|
447
462
|
},
|
|
448
463
|
|
|
449
|
-
|
|
464
|
+
38: {
|
|
450
465
|
file: "@apollo/client/link/http/createHttpLink.js",
|
|
451
466
|
message: "Multipart-subscriptions do not support @defer"
|
|
452
467
|
},
|
|
453
468
|
|
|
454
|
-
|
|
469
|
+
42: {
|
|
455
470
|
file: "@apollo/client/link/utils/toPromise.js",
|
|
456
471
|
message: "Promise Wrapper does not support multiple results from Observable"
|
|
457
472
|
},
|
|
458
473
|
|
|
459
|
-
|
|
474
|
+
50: {
|
|
460
475
|
file: "@apollo/client/react/hooks/useQuery.js",
|
|
461
476
|
message: "Calling default no-op implementation of InternalState#forceUpdate"
|
|
462
477
|
},
|
|
463
478
|
|
|
464
|
-
|
|
479
|
+
52: {
|
|
465
480
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
466
481
|
message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
|
|
467
482
|
},
|
|
468
483
|
|
|
469
|
-
|
|
484
|
+
53: {
|
|
470
485
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
471
486
|
message: "'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."
|
|
472
487
|
},
|
|
473
488
|
|
|
474
|
-
|
|
489
|
+
54: {
|
|
475
490
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
476
491
|
message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
|
|
477
492
|
},
|
|
478
493
|
|
|
479
|
-
|
|
494
|
+
55: {
|
|
480
495
|
file: "@apollo/client/react/hooks/useSubscription.js",
|
|
481
496
|
message: "'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."
|
|
482
497
|
},
|
|
483
498
|
|
|
484
|
-
|
|
499
|
+
57: {
|
|
485
500
|
file: "@apollo/client/react/hooks/useSuspenseQuery.js",
|
|
486
501
|
message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."
|
|
487
502
|
},
|
|
488
503
|
|
|
489
|
-
|
|
504
|
+
84: {
|
|
490
505
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
491
506
|
|
|
492
507
|
message: "Removing an @connection directive even though it does not have a key. " +
|
|
@@ -495,33 +510,33 @@ const devWarn = {
|
|
|
495
510
|
};
|
|
496
511
|
|
|
497
512
|
const devError = {
|
|
498
|
-
|
|
513
|
+
12: {
|
|
499
514
|
file: "@apollo/client/cache/inmemory/writeToStore.js",
|
|
500
515
|
message: "Missing field '%s' while writing result %o"
|
|
501
516
|
},
|
|
502
517
|
|
|
503
|
-
|
|
518
|
+
21: {
|
|
504
519
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
505
520
|
message: "Unhandled GraphQL subscription error"
|
|
506
521
|
},
|
|
507
522
|
|
|
508
|
-
|
|
523
|
+
23: {
|
|
509
524
|
file: "@apollo/client/core/ObservableQuery.js",
|
|
510
525
|
message: "Unhandled error"
|
|
511
526
|
},
|
|
512
527
|
|
|
513
|
-
|
|
528
|
+
58: {
|
|
514
529
|
file: "@apollo/client/react/hooks/useSyncExternalStore.js",
|
|
515
530
|
message: "The result of getSnapshot should be cached to avoid an infinite loop"
|
|
516
531
|
},
|
|
517
532
|
|
|
518
|
-
|
|
533
|
+
83: {
|
|
519
534
|
file: "@apollo/client/utilities/graphql/transform.js",
|
|
520
535
|
message: "Could not find operation or fragment"
|
|
521
536
|
}
|
|
522
537
|
};
|
|
523
538
|
|
|
524
|
-
var version = "3.9.0-alpha.
|
|
539
|
+
var version = "3.9.0-alpha.4";
|
|
525
540
|
|
|
526
541
|
function maybe(thunk) {
|
|
527
542
|
try {
|
|
@@ -625,7 +640,7 @@ function loadErrorMessageHandler() {
|
|
|
625
640
|
function handler(message, args) {
|
|
626
641
|
if (typeof message === "number") {
|
|
627
642
|
var definition = globals.global[ApolloErrorMessageHandler][message];
|
|
628
|
-
if (!message || !definition.message)
|
|
643
|
+
if (!message || !(definition === null || definition === void 0 ? void 0 : definition.message))
|
|
629
644
|
return;
|
|
630
645
|
message = definition.message;
|
|
631
646
|
}
|