@trackunit/react-core-contexts 0.4.336 → 0.4.337
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.cjs.js +2 -2
- package/index.esm.js +2 -2
- package/package.json +1 -1
- package/src/ManagerApolloProvider.d.ts +3 -3
package/index.cjs.js
CHANGED
|
@@ -167,7 +167,7 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
|
|
|
167
167
|
errorLink,
|
|
168
168
|
authLink,
|
|
169
169
|
client.split(operation => operation.getContext().clientName === "imageupload", imageUploadGraphQLLink),
|
|
170
|
-
client.split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, client.split(operation => operation.getContext().clientName === "report", reportGraphQLLink, client.split(
|
|
170
|
+
client.split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, client.split(operation => operation.getContext().clientName === "report", reportGraphQLLink, client.split(() => global.gql === "internal", internalGraphQLLink, publicGraphQLLink))),
|
|
171
171
|
]),
|
|
172
172
|
}),
|
|
173
173
|
setToken: (newToken) => {
|
|
@@ -213,7 +213,7 @@ const useApolloClient = () => {
|
|
|
213
213
|
* This is a provider for the ManagerApolloContext.
|
|
214
214
|
* It is used to provide the apollo client to the manager app.
|
|
215
215
|
*
|
|
216
|
-
* @param {
|
|
216
|
+
* @param {ManagerApolloProviderProps} props The props.
|
|
217
217
|
* @returns {JSX.Element} The provider.
|
|
218
218
|
*/
|
|
219
219
|
const ManagerApolloProvider = ({ children }) => {
|
package/index.esm.js
CHANGED
|
@@ -143,7 +143,7 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
|
|
|
143
143
|
errorLink,
|
|
144
144
|
authLink,
|
|
145
145
|
split(operation => operation.getContext().clientName === "imageupload", imageUploadGraphQLLink),
|
|
146
|
-
split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, split(
|
|
146
|
+
split(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split(operation => operation.getContext().clientName === "report", reportGraphQLLink, split(() => global.gql === "internal", internalGraphQLLink, publicGraphQLLink))),
|
|
147
147
|
]),
|
|
148
148
|
}),
|
|
149
149
|
setToken: (newToken) => {
|
|
@@ -189,7 +189,7 @@ const useApolloClient = () => {
|
|
|
189
189
|
* This is a provider for the ManagerApolloContext.
|
|
190
190
|
* It is used to provide the apollo client to the manager app.
|
|
191
191
|
*
|
|
192
|
-
* @param {
|
|
192
|
+
* @param {ManagerApolloProviderProps} props The props.
|
|
193
193
|
* @returns {JSX.Element} The provider.
|
|
194
194
|
*/
|
|
195
195
|
const ManagerApolloProvider = ({ children }) => {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
interface
|
|
2
|
+
interface ManagerApolloProviderProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* This is a provider for the ManagerApolloContext.
|
|
7
7
|
* It is used to provide the apollo client to the manager app.
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {ManagerApolloProviderProps} props The props.
|
|
10
10
|
* @returns {JSX.Element} The provider.
|
|
11
11
|
*/
|
|
12
|
-
export declare const ManagerApolloProvider: ({ children }:
|
|
12
|
+
export declare const ManagerApolloProvider: ({ children }: ManagerApolloProviderProps) => JSX.Element;
|
|
13
13
|
export {};
|