@gambalabs/apollo 6.0.0-alpha.17 → 6.0.0-alpha.20

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Nuxt Apollo](./docs/public/cover.jpg)
1
+ [![Nuxt Apollo](./docs/public/cover.jpg)](https://apollo.nuxtjs.org)
2
2
 
3
3
  <h1 align="center">Nuxt Apollo</h1>
4
4
 
@@ -0,0 +1,8 @@
1
+ import { C as ClientConfig } from './shared/apollo.d410709a.mjs';
2
+ import 'graphql-ws';
3
+ import '@apollo/client';
4
+ import 'nuxt/app';
5
+
6
+ declare const defineApolloClient: (config: ClientConfig) => ClientConfig;
7
+
8
+ export { ClientConfig, defineApolloClient };
@@ -0,0 +1,8 @@
1
+ import { C as ClientConfig } from './shared/apollo.d410709a.js';
2
+ import 'graphql-ws';
3
+ import '@apollo/client';
4
+ import 'nuxt/app';
5
+
6
+ declare const defineApolloClient: (config: ClientConfig) => ClientConfig;
7
+
8
+ export { ClientConfig, defineApolloClient };
@@ -0,0 +1,3 @@
1
+ const defineApolloClient = (config) => config;
2
+
3
+ export { defineApolloClient };
@@ -0,0 +1,31 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { N as NuxtApolloConfig, C as ClientConfig } from './shared/apollo.d410709a.mjs';
3
+ export { ErrorResponse } from '@apollo/client/link/error';
4
+ import 'graphql-ws';
5
+ import '@apollo/client';
6
+ import 'nuxt/app';
7
+
8
+ type ModuleOptions = NuxtApolloConfig;
9
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
10
+
11
+ declare const defineApolloClient: (config: ClientConfig) => ClientConfig;
12
+ interface ModuleRuntimeConfig {
13
+ apollo: NuxtApolloConfig<any>;
14
+ }
15
+ interface ModulePublicRuntimeConfig {
16
+ apollo: NuxtApolloConfig<any>;
17
+ }
18
+ declare module '@nuxt/schema' {
19
+ interface NuxtConfig {
20
+ ['apollo']?: Partial<ModuleOptions>;
21
+ }
22
+ interface NuxtOptions {
23
+ ['apollo']?: ModuleOptions;
24
+ }
25
+ interface RuntimeConfig extends ModuleRuntimeConfig {
26
+ }
27
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {
28
+ }
29
+ }
30
+
31
+ export { ClientConfig, type ModuleOptions, type ModulePublicRuntimeConfig, type ModuleRuntimeConfig, _default as default, defineApolloClient };
package/dist/module.d.ts CHANGED
@@ -1,235 +1,31 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { Ref } from 'vue';
3
- import { DefaultContext } from '@apollo/client/core';
4
- import { ClientOptions } from 'graphql-ws';
5
- import { HttpOptions, DefaultOptions, InMemoryCacheConfig } from '@apollo/client';
6
- import { CookieOptions } from 'nuxt/dist/app/composables';
7
- import { ErrorResponse } from '@apollo/client/link/error';
2
+ import { N as NuxtApolloConfig, C as ClientConfig } from './shared/apollo.d410709a.js';
8
3
  export { ErrorResponse } from '@apollo/client/link/error';
9
-
10
- type CookieAttributes = Omit< CookieOptions, 'encode' | 'decode' | 'expires' | 'default'>;
11
-
12
- type Pusher = {
13
- cluster: string;
14
- wsHost: string;
15
- wsPort: number;
16
- forceTLS: boolean;
17
- channelEndpoint: string;
18
- pusherAppKey: string;
19
- }
20
-
21
- type ClientConfig = {
22
- /**
23
- * The GraphQL endpoint.
24
- * @type {string}
25
- */
26
- httpEndpoint: string;
27
-
28
- /**
29
- * Provide a GraphQL endpoint to be used client-side. Overrides `httpEndpoint`.
30
- * @type {string}
31
- **/
32
- browserHttpEndpoint?: string;
33
-
34
- /**
35
- * Provide additional configuration for the `HttpLink`.
36
- * See https://www.apollographql.com/docs/link/links/http.html#options
37
- * @type {HttpOptions}
38
- **/
39
- httpLinkOptions?: Omit<HttpOptions, 'uri'>;
40
-
41
- /**
42
- * Provide additional configuration for the `GraphQLWsLink`.
43
- * See https://github.com/enisdenjo/graphql-ws/blob/master/docs/interfaces/client.ClientOptions.md
44
- **/
45
- wsLinkOptions?: Omit<ClientOptions, 'url' | 'connectionParams'>;
46
-
47
- /**
48
- * Specify a websocket endpoint to be used for subscriptions.
49
- * The `wss` protocol is recommended in production.
50
- * @type {string}
51
- **/
52
- wsEndpoint?: string;
53
-
54
- /**
55
- * Specify if the client should solely use WebSocket.
56
- * requires `wsEndpoint`.
57
- * @type {boolean}
58
- * @default false
59
- **/
60
- websocketsOnly?: boolean;
61
-
62
- /**
63
- * Specify a pusher config to be used for subscriptions.
64
- * @type {Pusher}
65
- **/
66
- pusher?: Pusher
67
-
68
- /**
69
- * Specify if the client should be able to connect to the Apollo Client Devtools in production mode.
70
- * @type {boolean}
71
- * @default false
72
- **/
73
- connectToDevTools?: boolean;
74
-
75
- /**
76
- * Configure default options to be applied to the apollo client.
77
- **/
78
- defaultOptions?: DefaultOptions;
79
-
80
- /**
81
- * Configure the in-memory cache.
82
- **/
83
- inMemoryCacheOptions?: InMemoryCacheConfig;
84
-
85
- /**
86
- * Specify the name under which the token will be stored.
87
- * as in either a cookie or localStorage.
88
- * @type {string}
89
- * @default "apollo:<client-name>.token"
90
- */
91
- tokenName?: string;
92
-
93
- /**
94
- * Specify if the auth token should be stored in `cookie` or `localStorage`.
95
- * `Cookie` storage is required for SSR.
96
- * @type {string}
97
- * @default "cookie"
98
- **/
99
- tokenStorage?: 'cookie' | 'localStorage';
100
-
101
- /**
102
- * Specify the Authentication scheme.
103
- * @type {string}
104
- * @default "Bearer"
105
- **/
106
- authType?: string | null;
107
-
108
- /**
109
- * Name of the Authentication token header.
110
- * @type {string}
111
- * @default "Authorization"
112
- */
113
- authHeader?: string;
114
-
115
- /**
116
- * Configuration for the auth cookie.
117
- **/
118
- cookieAttributes?: CookieAttributes;
119
-
120
- /**
121
- * Name of the CSRF token header.
122
- * @type {string}
123
- * @default "X-CSRF-TOKEN"
124
- */
125
- csrfHeader?: string
126
-
127
- /**
128
- * Enable automatic persisted queries.
129
- * @type {boolean}
130
- * @default false
131
- */
132
- persistedQueries?: boolean
133
- };
134
-
135
- interface NuxtApolloConfig<T = ClientConfig> {
136
- /**
137
- * Determine if vue-apollo composables should be automatically imported.
138
- * @type {boolean}
139
- * @default true
140
- **/
141
- autoImports?: boolean;
142
-
143
- /**
144
- * Configuration of the Apollo clients.
145
- **/
146
- clients?: Record< string, T extends boolean ? string | ClientConfig : ClientConfig >;
147
-
148
- /**
149
- * Default options to be applied to all Apollo clients.
150
- * This is useful for setting global defaults, and is overridden by `defaultOptions` passed directly to clients.
151
- **/
152
- defaultOptions?: DefaultOptions;
153
-
154
- /**
155
- * Pass cookies from the browser to the GraphQL API in SSR mode.
156
- *
157
- * @type boolean
158
- * @default true
159
- * */
160
- proxyCookies?: boolean;
161
-
162
- /**
163
- * Specify the Authentication scheme.
164
- * @type {string}
165
- * @default 'Bearer'
166
- **/
167
- authType?: string;
168
-
169
- /**
170
- * Name of the Authentication token header.
171
- * @type {string}
172
- * @default "Authorization"
173
- */
174
- authHeader?: string;
175
-
176
- /**
177
- * Name of the CSRF token header.
178
- * @type {string}
179
- * @default "X-CSRF-TOKEN"
180
- */
181
- csrfHeader?: string;
182
-
183
- /**
184
- * Specify if the auth token should be stored in `cookie` or `localStorage`.
185
- * `Cookie` storage is required for SSR.
186
- * @type {string}
187
- * @default "cookie"
188
- **/
189
- tokenStorage?: 'cookie' | 'localStorage';
190
-
191
- /**
192
- * Configuration for the auth cookie.
193
- **/
194
- cookieAttributes?: CookieAttributes;
195
-
196
- /**
197
- * Apollo client awareness instructs the client to send two additional headers
198
- * `apollographql-client-name` and `apollographql-client-version` in each HTTP request.
199
- * This behavior is disabled by default.
200
- * @type {boolean}
201
- * @default false
202
- */
203
- clientAwareness?: boolean
204
- }
4
+ import 'graphql-ws';
5
+ import '@apollo/client';
6
+ import 'nuxt/app';
205
7
 
206
8
  type ModuleOptions = NuxtApolloConfig;
207
- declare const _default: _nuxt_schema.NuxtModule<NuxtApolloConfig<any>>;
9
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
208
10
 
209
11
  declare const defineApolloClient: (config: ClientConfig) => ClientConfig;
210
- declare module '#app' {
211
- interface RuntimeConfig {
212
- apollo: NuxtApolloConfig<any>;
213
- public: {
214
- apollo: NuxtApolloConfig<any>;
215
- };
12
+ interface ModuleRuntimeConfig {
13
+ apollo: NuxtApolloConfig<any>;
14
+ }
15
+ interface ModulePublicRuntimeConfig {
16
+ apollo: NuxtApolloConfig<any>;
17
+ }
18
+ declare module '@nuxt/schema' {
19
+ interface NuxtConfig {
20
+ ['apollo']?: Partial<ModuleOptions>;
21
+ }
22
+ interface NuxtOptions {
23
+ ['apollo']?: ModuleOptions;
24
+ }
25
+ interface RuntimeConfig extends ModuleRuntimeConfig {
216
26
  }
217
- interface RuntimeNuxtHooks {
218
- 'apollo:auth': (params: {
219
- client: string;
220
- token: Ref<string | null>;
221
- }) => void;
222
- 'apollo:error': (error: ErrorResponse) => void;
223
- 'apollo:csrf': (params: {
224
- client: string;
225
- token: Ref<string | null>;
226
- }) => void;
227
- 'apollo:link': (params: {
228
- client: string;
229
- context: Ref<DefaultContext | null>;
230
- prevContextContext: DefaultContext | null;
231
- }) => void;
27
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {
232
28
  }
233
29
  }
234
30
 
235
- export { ClientConfig, ModuleOptions, _default as default, defineApolloClient };
31
+ export { ClientConfig, type ModuleOptions, type ModulePublicRuntimeConfig, type ModuleRuntimeConfig, _default as default, defineApolloClient };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gambalabs/apollo",
3
- "version": "6.0.0-alpha.17",
3
+ "version": "6.0.0-alpha.20",
4
4
  "configKey": "apollo",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0-rc.9"
package/dist/module.mjs CHANGED
@@ -5,7 +5,21 @@ import { useLogger, defineNuxtModule, createResolver, addTemplate, addPlugin, ad
5
5
  import GraphQLPlugin from '@rollup/plugin-graphql';
6
6
 
7
7
  const name = "@gambalabs/apollo";
8
- const version = "6.0.0-alpha.17";
8
+ const version = "6.0.0-alpha.20";
9
+
10
+ const serializeConfig = (obj) => {
11
+ if (typeof obj === "function") {
12
+ return obj.toString();
13
+ }
14
+ if (typeof obj === "object") {
15
+ if (Array.isArray(obj)) {
16
+ return `[${obj.map(serializeConfig).join(", ")}]`;
17
+ } else {
18
+ return `{${Object.entries(obj).map(([key, value]) => `${serializeConfig(key)}: ${serializeConfig(value)}`).join(", ")}}`;
19
+ }
20
+ }
21
+ return JSON.stringify(obj);
22
+ };
9
23
 
10
24
  const logger = useLogger(name);
11
25
  async function readConfigFile(path) {
@@ -29,19 +43,22 @@ const module = defineNuxtModule({
29
43
  proxyCookies: true,
30
44
  cookieAttributes: {
31
45
  maxAge: 60 * 60 * 24 * 7,
32
- secure: process.env.NODE_ENV === "production"
46
+ secure: process.env.NODE_ENV === "production",
47
+ sameSite: "lax"
33
48
  },
34
49
  clientAwareness: false
35
50
  },
36
51
  async setup(options, nuxt) {
37
52
  if (!options.clients || !Object.keys(options.clients).length) {
38
- throw new Error("[@nuxtjs/apollo] Atleast one client must be configured.");
53
+ logger.warn("No apollo clients configured.");
54
+ return;
39
55
  }
40
56
  const { resolve } = createResolver(import.meta.url);
41
57
  const rootResolver = createResolver(nuxt.options.rootDir);
42
58
  nuxt.options.build.transpile = nuxt.options.build.transpile || [];
43
59
  nuxt.options.build.transpile.push(
44
60
  resolve("runtime"),
61
+ "tslib",
45
62
  "@wry/context",
46
63
  "@apollo/client",
47
64
  "@vue/apollo-composable",
@@ -63,7 +80,7 @@ const module = defineNuxtModule({
63
80
  configPaths[k] = path;
64
81
  }
65
82
  }
66
- v.authType = v?.authType || (v?.authType === "" || v?.authType === null) ? null : options.authType;
83
+ v.authType = (v?.authType === void 0 ? options.authType : v?.authType) || null;
67
84
  v.authHeader = v?.authHeader || options.authHeader;
68
85
  v.csrfHeader = v?.csrfHeader || options.csrfHeader;
69
86
  v.tokenName = v?.tokenName || `apollo:${k}.token`;
@@ -82,24 +99,29 @@ const module = defineNuxtModule({
82
99
  filename: "apollo.d.ts",
83
100
  getContents: () => [
84
101
  'import type { ClientConfig } from "@nuxtjs/apollo"',
85
- "declare const clients: Record<string, ClientConfig>",
86
- "declare const clientAwareness: boolean",
87
- "declare const proxyCookies: boolean",
88
- "declare const cookieAttributes: ClientConfig['cookieAttributes']",
89
- "export default { clients, clientAwareness, proxyCookies, cookieAttributes }"
102
+ "declare module '#apollo' {",
103
+ ` export type ApolloClientKeys = '${Object.keys(clients).join("' | '")}'`,
104
+ " export const NuxtApollo: {",
105
+ " clients: Record<ApolloClientKeys, ClientConfig>",
106
+ " clientAwareness: boolean",
107
+ " proxyCookies: boolean",
108
+ " cookieAttributes: ClientConfig['cookieAttributes']",
109
+ " }",
110
+ "}"
90
111
  ].join("\n")
91
112
  });
92
- nuxt.options.alias["#apollo"] = addTemplate({
113
+ addTemplate({
93
114
  filename: "apollo.mjs",
94
115
  getContents: () => [
95
- "export default {",
116
+ "export const NuxtApollo = {",
96
117
  ` proxyCookies: ${options.proxyCookies},`,
97
118
  ` clientAwareness: ${options.clientAwareness},`,
98
- ` cookieAttributes: ${JSON.stringify(options.cookieAttributes)},`,
99
- ` clients: ${JSON.stringify(clients)}`,
119
+ ` cookieAttributes: ${serializeConfig(options.cookieAttributes)},`,
120
+ ` clients: ${serializeConfig(clients)}`,
100
121
  "}"
101
122
  ].join("\n")
102
- }).dst;
123
+ });
124
+ nuxt.options.alias["#apollo"] = resolve(nuxt.options.buildDir, "apollo");
103
125
  addPlugin(resolve("runtime/plugin"));
104
126
  addImports([
105
127
  { name: "gql", from: "graphql-tag" },
@@ -1,45 +1,97 @@
1
- import type { OperationVariables, QueryOptions } from '@apollo/client';
2
- import type { AsyncData } from 'nuxt/dist/app/composables';
1
+ import type { ApolloClient, OperationVariables, QueryOptions, DefaultContext } from '@apollo/client';
2
+ import type { AsyncData, AsyncDataOptions, NuxtError } from 'nuxt/app';
3
+ import type { ApolloClientKeys } from '#apollo';
4
+ type PickFrom<T, K extends Array<string>> = T extends Array<any> ? T : T extends Record<string, any> ? keyof T extends K[number] ? T : K[number] extends never ? T : Pick<T, K[number]> : T;
5
+ type KeysOf<T> = Array<T extends T ? keyof T extends string ? keyof T : never : never>;
3
6
  type TQuery<T> = QueryOptions<OperationVariables, T>['query'];
4
- type TVariables<T> = QueryOptions<OperationVariables, T>['variables'];
7
+ type TVariables<T> = QueryOptions<OperationVariables, T>['variables'] | null;
5
8
  type TAsyncQuery<T> = {
9
+ /**
10
+ * A unique key to ensure the query can be properly de-duplicated across requests. Defaults to a hash of the query and variables.
11
+ */
12
+ key?: string;
13
+ /**
14
+ * A GraphQL query string parsed into an AST with the gql template literal.
15
+ */
6
16
  query: TQuery<T>;
17
+ /**
18
+ * An object containing all of the GraphQL variables your query requires to execute.
19
+ *
20
+ * Each key in the object corresponds to a variable name, and that key's value corresponds to the variable value.
21
+ */
7
22
  variables?: TVariables<T>;
8
- key?: string;
23
+ /**
24
+ * The name of the Apollo Client to use. Defaults to `default`.
25
+ */
26
+ clientId?: ApolloClientKeys;
27
+ /**
28
+ * If you're using Apollo Link, this object is the initial value of the context object that's passed along your link chain.
29
+ */
30
+ context?: DefaultContext;
31
+ /**
32
+ * If `true`, this overrides the default fetchPolicy for the Apollo Client to `cache-first`.
33
+ * */
9
34
  cache?: boolean;
10
- clientId?: string;
11
35
  };
12
- export declare function useAsyncQuery<T>(opts: TAsyncQuery<T>): AsyncData<T, Error>;
13
- export declare function useAsyncQuery<T>(query: TQuery<T>, clientId?: string): AsyncData<T, Error>;
14
- export declare function useAsyncQuery<T>(query: TQuery<T>, variables?: TVariables<T>, clientId?: string): AsyncData<T, Error>;
15
- export declare function useLazyAsyncQuery<T>(opts: TAsyncQuery<T>): AsyncData<T, Error>;
16
- export declare function useLazyAsyncQuery<T>(query: TQuery<T>, clientId?: string): AsyncData<T, Error>;
17
- export declare function useLazyAsyncQuery<T>(query: TQuery<T>, variables?: TVariables<T>, clientId?: string): AsyncData<T, Error>;
18
- export declare const useApollo: () => {
36
+ /**
37
+ * `useAsyncQuery` resolves the GraphQL query asynchronously in a SSR-friendly composable.
38
+ *
39
+ * @param opts An object containing the query, variables, clientId, context, and cache options.
40
+ * @param options Customize the underlying `useAsyncData` composable.
41
+ */
42
+ export declare function useAsyncQuery<T, DataT = T, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null, NuxtErrorDataT = unknown>(opts: TAsyncQuery<T>, options?: AsyncDataOptions<T, DataT, PickKeys, DefaultT>): AsyncData<PickFrom<DataT, PickKeys> | DefaultT, (NuxtErrorDataT extends Error | NuxtError ? NuxtErrorDataT : NuxtError<NuxtErrorDataT>) | null>;
43
+ /**
44
+ * `useAsyncQuery` resolves the GraphQL query asynchronously in a SSR-friendly composable.
45
+ *
46
+ * @param query A GraphQL query string parsed into an AST with the gql template literal.
47
+ * @param variables An object containing all of the GraphQL variables your query requires to execute.
48
+ * @param clientId The name of the Apollo Client to use. Defaults to `default`.
49
+ * @param context The context object that's passed along your link chain.
50
+ * @param options Customize the underlying `useAsyncData` composable.
51
+ */
52
+ export declare function useAsyncQuery<T, DataT = T, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null, NuxtErrorDataT = unknown>(query: TQuery<T>, variables?: TVariables<T>, clientId?: ApolloClientKeys, context?: DefaultContext, options?: AsyncDataOptions<T, DataT, PickKeys, DefaultT>): AsyncData<PickFrom<DataT, PickKeys> | DefaultT, (NuxtErrorDataT extends Error | NuxtError ? NuxtErrorDataT : NuxtError<NuxtErrorDataT>) | null>;
53
+ /**
54
+ * `useLazyAsyncQuery` resolves the GraphQL query after loading the route, instead of blocking client-side navigation.
55
+ *
56
+ * @param opts An object containing the query, variables, clientId, context, and cache options.
57
+ * @param options Customize the underlying `useAsyncData` composable.
58
+ */
59
+ export declare function useLazyAsyncQuery<T, DataT = T, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null, NuxtErrorDataT = unknown>(opts: TAsyncQuery<T>, options?: AsyncDataOptions<T, DataT, PickKeys, DefaultT>): AsyncData<PickFrom<DataT, PickKeys> | DefaultT, (NuxtErrorDataT extends Error | NuxtError ? NuxtErrorDataT : NuxtError<NuxtErrorDataT>) | null>;
60
+ /**
61
+ * `useLazyAsyncQuery` resolves the GraphQL query after loading the route, instead of blocking client-side navigation.
62
+ *
63
+ * @param query A GraphQL query string parsed into an AST with the gql template literal.
64
+ * @param variables An object containing all of the GraphQL variables your query requires to execute.
65
+ * @param clientId The name of the Apollo Client to use. Defaults to `default`.
66
+ * @param context The context object that's passed along your link chain.
67
+ * @param options Customize the underlying `useAsyncData` composable.
68
+ */
69
+ export declare function useLazyAsyncQuery<T, DataT = T, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null, NuxtErrorDataT = unknown>(query: TQuery<T>, variables?: TVariables<T>, clientId?: string, context?: DefaultContext, options?: AsyncDataOptions<T, DataT, PickKeys, DefaultT>): AsyncData<PickFrom<DataT, PickKeys> | DefaultT, (NuxtErrorDataT extends Error | NuxtError ? NuxtErrorDataT : NuxtError<NuxtErrorDataT>) | null>;
70
+ export declare function useApollo(): {
71
+ /**
72
+ * Access the configured apollo clients.
73
+ */
74
+ clients: Record<ApolloClientKeys, ApolloClient<any>> | undefined;
19
75
  /**
20
76
  * Retrieve the auth token for the specified client. Adheres to the `apollo:auth` hook.
21
77
  *
22
78
  * @param {string} client The client who's token to retrieve. Defaults to `default`.
23
79
  */
24
- getToken: (client?: string) => Promise<any>;
25
- /**
26
- * Access the configured apollo clients.
27
- */
28
- clients: Record<string, import("@apollo/client").ApolloClient<any>> | undefined;
80
+ getToken: (client?: ApolloClientKeys) => Promise<string | null | undefined>;
29
81
  /**
30
82
  * Apply auth token to the specified Apollo client, and optionally reset it's cache.
31
83
  *
32
84
  * @param {string} token The token to be applied.
33
85
  * @param {string} client - Name of the Apollo client. Defaults to `default`.
34
- * @param {boolean} skipResetStore - If `true`, the cache will not be reset.
86
+ * @param {boolean} skipResetStore - If `false`, Resets your entire store by clearing out your cache and then re-executing all of your active queries.
35
87
  * */
36
- onLogin: (token?: string, client?: string, skipResetStore?: boolean) => Promise<void>;
88
+ onLogin: (token?: string, client?: ApolloClientKeys, skipResetStore?: boolean) => Promise<void>;
37
89
  /**
38
90
  * Remove the auth token from the Apollo client, and optionally reset it's cache.
39
91
  *
40
92
  * @param {string} client - Name of the Apollo client. Defaults to `default`.
41
- * @param {boolean} skipResetStore - If `true`, the cache will not be reset.
93
+ * @param {boolean} skipResetStore - If `false`, Resets your entire store by clearing out your cache and then re-executing all of your active queries.
42
94
  * */
43
- onLogout: (client?: string, skipResetStore?: boolean) => Promise<void>;
95
+ onLogout: (client?: ApolloClientKeys, skipResetStore?: boolean) => Promise<void>;
44
96
  };
45
97
  export {};