@quiltt/core 3.8.2 → 3.9.0
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/CHANGELOG.md +11 -0
- package/dist/{SubscriptionLink-client-Cm-b-MAk.js → SubscriptionLink-client-DwoIOVtr.js} +3 -2
- package/dist/index.d.ts +14 -12
- package/dist/index.js +10 -8
- package/package.json +3 -3
- package/src/api/graphql/client.ts +15 -8
- package/src/api/graphql/links/ActionCableLink.ts +4 -2
- package/src/api/graphql/links/AuthLink.ts +3 -2
- package/src/api/graphql/links/BatchHttpLink.ts +1 -1
- package/src/api/graphql/links/ErrorLink.ts +2 -2
- package/src/api/graphql/links/ForwardableLink.ts +1 -1
- package/src/api/graphql/links/HttpLink.ts +1 -1
- package/src/api/graphql/links/RetryLink.ts +1 -1
- package/src/api/graphql/links/TerminatingLink.ts +1 -1
- package/src/api/graphql/links/VersionLink.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @quiltt/core
|
|
2
2
|
|
|
3
|
+
## 3.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#307](https://github.com/quiltt/quiltt-js/pull/307) [`d0033cd`](https://github.com/quiltt/quiltt-js/commit/d0033cdbdaf33f9227afa55c9a6078156809a563) Thanks [@rubendinho](https://github.com/rubendinho)! - - Significantly reduce bundle size by migrating @apollo/client to "deep entrypoint import style"
|
|
8
|
+
- Bump @apollo/client to v3.11.8
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [#305](https://github.com/quiltt/quiltt-js/pull/305) [`803a4d0`](https://github.com/quiltt/quiltt-js/commit/803a4d09e458ed2e72781fcd475ad5f9639f2bf2) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Optimize connector WebView implementation
|
|
13
|
+
|
|
3
14
|
## 3.8.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { ApolloLink
|
|
2
|
+
import { ApolloLink } from '@apollo/client/core';
|
|
3
|
+
import { Observable as Observable$1 } from '@apollo/client/utilities';
|
|
3
4
|
import { createConsumer } from '@rails/actioncable';
|
|
4
5
|
import { print } from 'graphql';
|
|
5
6
|
|
|
@@ -203,7 +204,7 @@ import { print } from 'graphql';
|
|
|
203
204
|
*/ const GlobalStorage = new Storage();
|
|
204
205
|
|
|
205
206
|
var name = "@quiltt/core";
|
|
206
|
-
var version$1 = "3.
|
|
207
|
+
var version$1 = "3.9.0";
|
|
207
208
|
|
|
208
209
|
const QUILTT_API_INSECURE = (()=>{
|
|
209
210
|
try {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import * as _apollo_client_core from '@apollo/client/core';
|
|
2
|
+
import { ApolloLink, Operation, NextLink, FetchResult, ApolloClientOptions, ApolloClient } from '@apollo/client/core';
|
|
3
|
+
export { ApolloError, OperationVariables, gql } from '@apollo/client/core';
|
|
4
|
+
import { Observable as Observable$1 } from '@apollo/client/utilities';
|
|
5
|
+
import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http';
|
|
6
|
+
import { HttpLink as HttpLink$1 } from '@apollo/client/link/http';
|
|
7
|
+
import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry';
|
|
8
8
|
import { Consumer } from '@rails/actioncable';
|
|
9
9
|
import { Dispatch, SetStateAction } from 'react';
|
|
10
|
+
export { InMemoryCache, NormalizedCacheObject } from '@apollo/client/cache';
|
|
11
|
+
export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks';
|
|
10
12
|
|
|
11
13
|
interface CallbackManager {
|
|
12
14
|
onEvent(callback: ConnectorSDKOnEventCallback): void;
|
|
@@ -135,7 +137,7 @@ declare class AuthLink extends ApolloLink {
|
|
|
135
137
|
|
|
136
138
|
declare const BatchHttpLink: BatchHttpLink$1;
|
|
137
139
|
|
|
138
|
-
declare const ErrorLink:
|
|
140
|
+
declare const ErrorLink: _apollo_client_core.ApolloLink;
|
|
139
141
|
|
|
140
142
|
declare const ForwardableLink: ApolloLink;
|
|
141
143
|
|
|
@@ -143,11 +145,11 @@ declare const HttpLink: HttpLink$1;
|
|
|
143
145
|
|
|
144
146
|
declare const RetryLink: RetryLink$1;
|
|
145
147
|
|
|
146
|
-
type RequestResult = FetchResult
|
|
148
|
+
type RequestResult = FetchResult<{
|
|
147
149
|
[key: string]: unknown;
|
|
148
150
|
}, Record<string, unknown>, Record<string, unknown>>;
|
|
149
|
-
type ConnectionParams = object | ((operation: Operation
|
|
150
|
-
declare class ActionCableLink extends ApolloLink
|
|
151
|
+
type ConnectionParams = object | ((operation: Operation) => object);
|
|
152
|
+
declare class ActionCableLink extends ApolloLink {
|
|
151
153
|
cables: {
|
|
152
154
|
[id: string]: Consumer;
|
|
153
155
|
};
|
|
@@ -159,7 +161,7 @@ declare class ActionCableLink extends ApolloLink$1 {
|
|
|
159
161
|
actionName?: string;
|
|
160
162
|
connectionParams?: ConnectionParams;
|
|
161
163
|
});
|
|
162
|
-
request(operation: Operation
|
|
164
|
+
request(operation: Operation, _next: NextLink): Observable$1<RequestResult> | null;
|
|
163
165
|
}
|
|
164
166
|
|
|
165
167
|
declare class SubscriptionLink extends ActionCableLink {
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ApolloLink, ApolloClient } from '@apollo/client/
|
|
2
|
-
export {
|
|
3
|
-
import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-
|
|
4
|
-
export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-
|
|
5
|
-
import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http
|
|
1
|
+
import { ApolloLink, ApolloClient } from '@apollo/client/core';
|
|
2
|
+
export { gql } from '@apollo/client/core';
|
|
3
|
+
import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-DwoIOVtr.js';
|
|
4
|
+
export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-DwoIOVtr.js';
|
|
5
|
+
import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http';
|
|
6
6
|
import crossfetch from 'cross-fetch';
|
|
7
|
-
import { onError } from '@apollo/client/link/error
|
|
8
|
-
import { HttpLink as HttpLink$1 } from '@apollo/client/link/http
|
|
9
|
-
import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry
|
|
7
|
+
import { onError } from '@apollo/client/link/error';
|
|
8
|
+
import { HttpLink as HttpLink$1 } from '@apollo/client/link/http';
|
|
9
|
+
import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry';
|
|
10
|
+
export { InMemoryCache } from '@apollo/client/cache';
|
|
11
|
+
export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks';
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Enum representing the different types of events emitted by the Connector.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltt/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Javascript API client and utilities for Quiltt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"quiltt",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"CHANGELOG.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@apollo/client": "^3.
|
|
34
|
+
"@apollo/client": "^3.11.8",
|
|
35
35
|
"@rails/actioncable": "^7.2.200",
|
|
36
36
|
"braces": "^3.0.3",
|
|
37
37
|
"cross-fetch": "^4.0.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@biomejs/biome": "1.9.4",
|
|
43
|
-
"@types/node": "22.
|
|
43
|
+
"@types/node": "22.10.2",
|
|
44
44
|
"@types/rails__actioncable": "6.1.11",
|
|
45
45
|
"@types/react": "18.3.12",
|
|
46
46
|
"bunchee": "5.6.1",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ApolloClientOptions, Operation } from '@apollo/client/
|
|
2
|
-
import { ApolloClient, ApolloLink } from '@apollo/client/
|
|
1
|
+
import type { ApolloClientOptions, Operation } from '@apollo/client/core'
|
|
2
|
+
import { ApolloClient, ApolloLink } from '@apollo/client/core'
|
|
3
3
|
|
|
4
4
|
import { debugging } from '../../configuration'
|
|
5
5
|
import {
|
|
@@ -44,9 +44,16 @@ export class QuilttClient<T> extends ApolloClient<T> {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
/**
|
|
48
|
+
/* Export Apollo GraphQL assets using deep-imports to prevent unnecessary imports
|
|
49
|
+
/* and make tree-shaking more effective
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/** Client and Tooling */
|
|
53
|
+
export { gql } from '@apollo/client/core'
|
|
54
|
+
export { InMemoryCache } from '@apollo/client/cache'
|
|
55
|
+
export type { ApolloError, OperationVariables } from '@apollo/client/core'
|
|
56
|
+
export type { NormalizedCacheObject } from '@apollo/client/cache'
|
|
57
|
+
|
|
58
|
+
/** React hooks used by @quiltt/react-native and @quiltt/react */
|
|
59
|
+
export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ApolloLink } from '@apollo/client/core'
|
|
2
|
+
import { Observable } from '@apollo/client/utilities'
|
|
3
|
+
import type { FetchResult, NextLink, Operation } from '@apollo/client/core'
|
|
4
|
+
|
|
3
5
|
import { createConsumer } from '@rails/actioncable'
|
|
4
6
|
import type { Consumer } from '@rails/actioncable'
|
|
5
7
|
import { print } from 'graphql'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { ApolloLink } from '@apollo/client/core'
|
|
2
|
+
import type { FetchResult, NextLink, Operation } from '@apollo/client/core'
|
|
3
|
+
import type { Observable } from '@apollo/client/utilities'
|
|
3
4
|
|
|
4
5
|
import { GlobalStorage } from '@/storage'
|
|
5
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GlobalStorage } from '@/storage'
|
|
2
2
|
|
|
3
|
-
import type { ServerError } from '@apollo/client/
|
|
4
|
-
import { onError } from '@apollo/client/link/error
|
|
3
|
+
import type { ServerError } from '@apollo/client/core'
|
|
4
|
+
import { onError } from '@apollo/client/link/error'
|
|
5
5
|
|
|
6
6
|
export const ErrorLink = onError(({ graphQLErrors, networkError }) => {
|
|
7
7
|
if (graphQLErrors) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http
|
|
1
|
+
import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http'
|
|
2
2
|
import crossfetch from 'cross-fetch'
|
|
3
3
|
|
|
4
4
|
// Use `cross-fetch` only if `fetch` is not available on the `globalThis` object
|