@common-stack/frontend-stack-react 6.0.6-alpha.15 → 6.0.6-alpha.18

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,4 +1,4 @@
1
- import {isBoolean,merge}from'lodash-es';import {ApolloLink,ApolloClient}from'@apollo/client/index.js';import {HttpLink}from'@apollo/client/link/http/index.js';import {BatchHttpLink}from'@apollo/client/link/batch-http/index.js';import {onError}from'@apollo/client/link/error/index.js';import {GraphQLWsLink}from'@apollo/client/link/subscriptions/index.js';import {getOperationAST}from'graphql';import {invariant}from'ts-invariant';import {RetryLink}from'@apollo/client/link/retry/index.js';import {createClient}from'graphql-ws';import fetch from'cross-fetch';import {createCache,initializeCache}from'./base-apollo-cache.js';// apolloClient.ts
1
+ import {merge}from'lodash-es';import {ApolloLink,ApolloClient}from'@apollo/client/index.js';import {HttpLink}from'@apollo/client/link/http/index.js';import {BatchHttpLink}from'@apollo/client/link/batch-http/index.js';import {onError}from'@apollo/client/link/error/index.js';import {GraphQLWsLink}from'@apollo/client/link/subscriptions/index.js';import {getOperationAST}from'graphql';import {invariant}from'ts-invariant';import {RetryLink}from'@apollo/client/link/retry/index.js';import {createClient}from'graphql-ws';import fetch from'cross-fetch';import {createCache,initializeCache}from'./base-apollo-cache.js';// apolloClient.ts
2
2
  const schema = `
3
3
  # Add your schema here
4
4
  `;
@@ -25,16 +25,16 @@ const createApolloClient = ({ scope, isDev, isDebug, isSSR, getDataIdFromObject,
25
25
  logger.debug('Created new Apollo memory cache');
26
26
  const retryLink = new RetryLink({
27
27
  attempts: async (count, operation, error) => {
28
- logger.debug('Retrying link attempt', { count, operation, error });
29
- const promises = (clientState.retryLinkAttemptFuncs || []).map((func) => func(count, operation, error));
30
- try {
31
- const result = await Promise.all(promises);
32
- return !!result.find((item) => item && isBoolean(item));
33
- }
34
- catch (e) {
35
- logger.error('Error occurred in retryLink attempt condition', e);
36
- throw e;
37
- }
28
+ return false;
29
+ // logger.debug('Retrying link attempt', { count, operation, error });
30
+ // const promises = (clientState.retryLinkAttemptFuncs || []).map((func) => func(count, operation, error));
31
+ // try {
32
+ // const result = await Promise.all(promises);
33
+ // return !!result.find((item) => item && isBoolean(item));
34
+ // } catch (e) {
35
+ // logger.error('Error occurred in retryLink attempt condition', e);
36
+ // throw e;
37
+ // }
38
38
  },
39
39
  });
40
40
  let link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/frontend-stack-react",
3
- "version": "6.0.6-alpha.15",
3
+ "version": "6.0.6-alpha.18",
4
4
  "description": "Client Module for react app",
5
5
  "homepage": "https://github.com/cdmbase/fullstack-pro#readme",
6
6
  "bugs": {
@@ -33,7 +33,7 @@
33
33
  "@cdm-logger/client": "^9.0.3",
34
34
  "@cdm-logger/server": "^9.0.3",
35
35
  "@common-stack/client-core": "6.0.6-alpha.5",
36
- "@common-stack/client-react": "6.0.6-alpha.5",
36
+ "@common-stack/client-react": "6.0.6-alpha.17",
37
37
  "@common-stack/components-pro": "6.0.6-alpha.5",
38
38
  "@common-stack/core": "6.0.6-alpha.5",
39
39
  "@common-stack/remix-router-redux": "6.0.6-alpha.14",
@@ -97,5 +97,5 @@
97
97
  "typescript": {
98
98
  "definition": "lib/index.d.ts"
99
99
  },
100
- "gitHead": "8d0ce9ee36430bbba3ee482516532d8c2482cf12"
100
+ "gitHead": "ca95c69277f59ef75e660879ee0cd5ea1e1ca302"
101
101
  }