@sumaris-net/ngx-components 18.5.0-rc1 → 18.5.0-rc2
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/esm2022/src/app/core/graphql/graphql.service.mjs +3 -6
- package/esm2022/src/app/core/graphql/graphql.utils.mjs +2 -2
- package/esm2022/src/app/core/services/network.types.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +2 -5
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/graphql/graphql.service.d.ts +2 -8
- package/src/app/core/graphql/graphql.utils.d.ts +5 -0
- package/src/app/core/services/network.types.d.ts +2 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { ApolloCache, ApolloClient, FetchPolicy, MutationUpdaterFunction, Operat
|
|
|
4
4
|
import { ServiceError } from '../services/errors';
|
|
5
5
|
import { InjectionToken } from '@angular/core';
|
|
6
6
|
import { NetworkService } from '../services/network.service';
|
|
7
|
-
import { EmptyObject } from './graphql.utils';
|
|
7
|
+
import { EmptyObject, TrackableMutationContext } from './graphql.utils';
|
|
8
8
|
import { Platform } from '@ionic/angular';
|
|
9
9
|
import { IEntity } from '../services/model/entity.model';
|
|
10
10
|
import { Resolvers } from '@apollo/client/core/types';
|
|
@@ -23,12 +23,7 @@ export interface WatchQueryOptions<V> {
|
|
|
23
23
|
error?: ServiceError;
|
|
24
24
|
fetchPolicy?: WatchQueryFetchPolicy;
|
|
25
25
|
}
|
|
26
|
-
export interface
|
|
27
|
-
serializationKey?: string;
|
|
28
|
-
tracked?: boolean;
|
|
29
|
-
timeout?: number;
|
|
30
|
-
}
|
|
31
|
-
export interface MutateQueryOptions<TData, TVariables = OperationVariables, TContext extends TrackedMutationContext = TrackedMutationContext, TCache extends ApolloCache<any> = ApolloCache<any>> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
|
|
26
|
+
export interface MutateQueryOptions<TData, TVariables = OperationVariables, TContext = TrackableMutationContext, TCache extends ApolloCache<any> = ApolloCache<any>> extends MutationBaseOptions<TData, TVariables, TContext, TCache> {
|
|
32
27
|
mutation: any;
|
|
33
28
|
variables?: TVariables;
|
|
34
29
|
error?: ServiceError;
|
|
@@ -138,7 +133,6 @@ export declare class GraphqlService extends StartableService<ApolloClient<any>>
|
|
|
138
133
|
protected ngOnStart(): Promise<ApolloClient<any>>;
|
|
139
134
|
protected ngOnStop(): Promise<void>;
|
|
140
135
|
protected resetClient(client?: ApolloClient<any>): Promise<void>;
|
|
141
|
-
private onApolloError;
|
|
142
136
|
private toApolloError;
|
|
143
137
|
private createAppErrorByCode;
|
|
144
138
|
private getI18nErrorMessageByCode;
|
|
@@ -21,6 +21,11 @@ export interface TrackedQuery {
|
|
|
21
21
|
variablesJSON: string;
|
|
22
22
|
contextJSON: string;
|
|
23
23
|
}
|
|
24
|
+
export interface TrackableMutationContext extends Record<string, any> {
|
|
25
|
+
serializationKey?: string;
|
|
26
|
+
tracked?: boolean;
|
|
27
|
+
timeout?: number;
|
|
28
|
+
}
|
|
24
29
|
export declare const TRACKED_QUERIES_STORAGE_KEY = "apollo-tracker-persist";
|
|
25
30
|
export declare function createTrackerLink(opts: {
|
|
26
31
|
storage?: PersistentStorage<string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConnectionType } from '@capacitor/network';
|
|
1
2
|
export type AuthTokenType = 'token' | 'basic' | 'basic-and-token';
|
|
2
3
|
export declare type NetworkEventType = 'start' | 'peerChanged' | 'statusChanged' | 'resetCache' | 'beforeTryOnlineFinish';
|
|
3
|
-
export
|
|
4
|
+
export { ConnectionType };
|