@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 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(operation => operation.getContext().clientName === "internal", internalGraphQLLink, publicGraphQLLink))),
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 {IProps} props The props.
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(operation => operation.getContext().clientName === "internal", internalGraphQLLink, publicGraphQLLink))),
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 {IProps} props The props.
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "0.4.336",
3
+ "version": "0.4.337",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -1,13 +1,13 @@
1
1
  import * as React from "react";
2
- interface IProps {
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 {IProps} props The props.
9
+ * @param {ManagerApolloProviderProps} props The props.
10
10
  * @returns {JSX.Element} The provider.
11
11
  */
12
- export declare const ManagerApolloProvider: ({ children }: IProps) => JSX.Element;
12
+ export declare const ManagerApolloProvider: ({ children }: ManagerApolloProviderProps) => JSX.Element;
13
13
  export {};