Skip to content

Commit 1b23337

Browse files
Add ability to configure a name for the client for use with devtools (#11936)
Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
1 parent 602a678 commit 1b23337

15 files changed

+201
-6
lines changed

.api-reports/api-report-core.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ export class ApolloClient<TCacheShape> implements DataProxy {
103103
get defaultContext(): Partial<DefaultContext>;
104104
// (undocumented)
105105
defaultOptions: DefaultOptions;
106+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
107+
//
108+
// (undocumented)
109+
readonly devtoolsConfig: DevtoolsOptions;
106110
// (undocumented)
107111
disableNetworkFetches: boolean;
108112
get documentTransform(): DocumentTransform;
@@ -144,12 +148,14 @@ export class ApolloClient<TCacheShape> implements DataProxy {
144148
export interface ApolloClientOptions<TCacheShape> {
145149
assumeImmutableResults?: boolean;
146150
cache: ApolloCache<TCacheShape>;
151+
// @deprecated
147152
connectToDevTools?: boolean;
148153
// (undocumented)
149154
credentials?: string;
150155
// (undocumented)
151156
defaultContext?: Partial<DefaultContext>;
152157
defaultOptions?: DefaultOptions;
158+
devtools?: DevtoolsOptions;
153159
// (undocumented)
154160
documentTransform?: DocumentTransform;
155161
// (undocumented)
@@ -593,6 +599,12 @@ interface DeleteModifier {
593599
// @public (undocumented)
594600
const _deleteModifier: unique symbol;
595601

602+
// @public (undocumented)
603+
interface DevtoolsOptions {
604+
enabled?: boolean;
605+
name?: string;
606+
}
607+
596608
// @public (undocumented)
597609
export type DiffQueryAgainstStoreOptions = ReadQueryOptions & {
598610
returnPartialData?: boolean;

.api-reports/api-report-react.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
114114
get defaultContext(): Partial<Context>;
115115
// (undocumented)
116116
defaultOptions: DefaultOptions;
117+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
118+
//
119+
// (undocumented)
120+
readonly devtoolsConfig: DevtoolsOptions;
117121
// (undocumented)
118122
disableNetworkFetches: boolean;
119123
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
171175
interface ApolloClientOptions<TCacheShape> {
172176
assumeImmutableResults?: boolean;
173177
cache: ApolloCache<TCacheShape>;
178+
// @deprecated
174179
connectToDevTools?: boolean;
175180
// (undocumented)
176181
credentials?: string;
177182
// (undocumented)
178183
defaultContext?: Partial<Context>;
179184
defaultOptions?: DefaultOptions;
185+
devtools?: DevtoolsOptions;
180186
// (undocumented)
181187
documentTransform?: DocumentTransform;
182188
// (undocumented)
@@ -680,6 +686,12 @@ interface DeleteModifier {
680686
// @public (undocumented)
681687
const _deleteModifier: unique symbol;
682688

689+
// @public (undocumented)
690+
interface DevtoolsOptions {
691+
enabled?: boolean;
692+
name?: string;
693+
}
694+
683695
// @public (undocumented)
684696
class DocumentTransform {
685697
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_components.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
114114
get defaultContext(): Partial<DefaultContext>;
115115
// (undocumented)
116116
defaultOptions: DefaultOptions;
117+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
118+
//
119+
// (undocumented)
120+
readonly devtoolsConfig: DevtoolsOptions;
117121
// (undocumented)
118122
disableNetworkFetches: boolean;
119123
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -172,12 +176,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
172176
interface ApolloClientOptions<TCacheShape> {
173177
assumeImmutableResults?: boolean;
174178
cache: ApolloCache<TCacheShape>;
179+
// @deprecated
175180
connectToDevTools?: boolean;
176181
// (undocumented)
177182
credentials?: string;
178183
// (undocumented)
179184
defaultContext?: Partial<DefaultContext>;
180185
defaultOptions?: DefaultOptions;
186+
devtools?: DevtoolsOptions;
181187
// (undocumented)
182188
documentTransform?: DocumentTransform;
183189
// (undocumented)
@@ -623,6 +629,12 @@ interface DeleteModifier {
623629
// @public (undocumented)
624630
const _deleteModifier: unique symbol;
625631

632+
// @public (undocumented)
633+
interface DevtoolsOptions {
634+
enabled?: boolean;
635+
name?: string;
636+
}
637+
626638
// @public (undocumented)
627639
class DocumentTransform {
628640
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_context.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
113113
get defaultContext(): Partial<DefaultContext>;
114114
// (undocumented)
115115
defaultOptions: DefaultOptions;
116+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
117+
//
118+
// (undocumented)
119+
readonly devtoolsConfig: DevtoolsOptions;
116120
// (undocumented)
117121
disableNetworkFetches: boolean;
118122
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
171175
interface ApolloClientOptions<TCacheShape> {
172176
assumeImmutableResults?: boolean;
173177
cache: ApolloCache<TCacheShape>;
178+
// @deprecated
174179
connectToDevTools?: boolean;
175180
// (undocumented)
176181
credentials?: string;
177182
// (undocumented)
178183
defaultContext?: Partial<DefaultContext>;
179184
defaultOptions?: DefaultOptions;
185+
devtools?: DevtoolsOptions;
180186
// (undocumented)
181187
documentTransform?: DocumentTransform;
182188
// (undocumented)
@@ -618,6 +624,12 @@ interface DeleteModifier {
618624
// @public (undocumented)
619625
const _deleteModifier: unique symbol;
620626

627+
// @public (undocumented)
628+
interface DevtoolsOptions {
629+
enabled?: boolean;
630+
name?: string;
631+
}
632+
621633
// @public (undocumented)
622634
class DocumentTransform {
623635
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_hoc.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
113113
get defaultContext(): Partial<DefaultContext>;
114114
// (undocumented)
115115
defaultOptions: DefaultOptions;
116+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
117+
//
118+
// (undocumented)
119+
readonly devtoolsConfig: DevtoolsOptions;
116120
// (undocumented)
117121
disableNetworkFetches: boolean;
118122
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
171175
interface ApolloClientOptions<TCacheShape> {
172176
assumeImmutableResults?: boolean;
173177
cache: ApolloCache<TCacheShape>;
178+
// @deprecated
174179
connectToDevTools?: boolean;
175180
// (undocumented)
176181
credentials?: string;
177182
// (undocumented)
178183
defaultContext?: Partial<DefaultContext>;
179184
defaultOptions?: DefaultOptions;
185+
devtools?: DevtoolsOptions;
180186
// (undocumented)
181187
documentTransform?: DocumentTransform;
182188
// (undocumented)
@@ -616,6 +622,12 @@ interface DeleteModifier {
616622
// @public (undocumented)
617623
const _deleteModifier: unique symbol;
618624

625+
// @public (undocumented)
626+
interface DevtoolsOptions {
627+
enabled?: boolean;
628+
name?: string;
629+
}
630+
619631
// @public (undocumented)
620632
class DocumentTransform {
621633
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_hooks.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
112112
get defaultContext(): Partial<DefaultContext>;
113113
// (undocumented)
114114
defaultOptions: DefaultOptions;
115+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
116+
//
117+
// (undocumented)
118+
readonly devtoolsConfig: DevtoolsOptions;
115119
// (undocumented)
116120
disableNetworkFetches: boolean;
117121
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
170174
interface ApolloClientOptions<TCacheShape> {
171175
assumeImmutableResults?: boolean;
172176
cache: ApolloCache<TCacheShape>;
177+
// @deprecated
173178
connectToDevTools?: boolean;
174179
// (undocumented)
175180
credentials?: string;
176181
// (undocumented)
177182
defaultContext?: Partial<DefaultContext>;
178183
defaultOptions?: DefaultOptions;
184+
devtools?: DevtoolsOptions;
179185
// (undocumented)
180186
documentTransform?: DocumentTransform;
181187
// (undocumented)
@@ -646,6 +652,12 @@ interface DeleteModifier {
646652
// @public (undocumented)
647653
const _deleteModifier: unique symbol;
648654

655+
// @public (undocumented)
656+
interface DevtoolsOptions {
657+
enabled?: boolean;
658+
name?: string;
659+
}
660+
649661
// @public (undocumented)
650662
class DocumentTransform {
651663
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_internal.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
112112
get defaultContext(): Partial<DefaultContext>;
113113
// (undocumented)
114114
defaultOptions: DefaultOptions;
115+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
116+
//
117+
// (undocumented)
118+
readonly devtoolsConfig: DevtoolsOptions;
115119
// (undocumented)
116120
disableNetworkFetches: boolean;
117121
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
170174
interface ApolloClientOptions<TCacheShape> {
171175
assumeImmutableResults?: boolean;
172176
cache: ApolloCache<TCacheShape>;
177+
// @deprecated
173178
connectToDevTools?: boolean;
174179
// (undocumented)
175180
credentials?: string;
176181
// (undocumented)
177182
defaultContext?: Partial<DefaultContext>;
178183
defaultOptions?: DefaultOptions;
184+
devtools?: DevtoolsOptions;
179185
// (undocumented)
180186
documentTransform?: DocumentTransform;
181187
// (undocumented)
@@ -631,6 +637,12 @@ interface DeleteModifier {
631637
// @public (undocumented)
632638
const _deleteModifier: unique symbol;
633639

640+
// @public (undocumented)
641+
interface DevtoolsOptions {
642+
enabled?: boolean;
643+
name?: string;
644+
}
645+
634646
// @public (undocumented)
635647
class DocumentTransform {
636648
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-react_ssr.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
113113
get defaultContext(): Partial<DefaultContext>;
114114
// (undocumented)
115115
defaultOptions: DefaultOptions;
116+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
117+
//
118+
// (undocumented)
119+
readonly devtoolsConfig: DevtoolsOptions;
116120
// (undocumented)
117121
disableNetworkFetches: boolean;
118122
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
171175
interface ApolloClientOptions<TCacheShape> {
172176
assumeImmutableResults?: boolean;
173177
cache: ApolloCache<TCacheShape>;
178+
// @deprecated
174179
connectToDevTools?: boolean;
175180
// (undocumented)
176181
credentials?: string;
177182
// (undocumented)
178183
defaultContext?: Partial<DefaultContext>;
179184
defaultOptions?: DefaultOptions;
185+
devtools?: DevtoolsOptions;
180186
// (undocumented)
181187
documentTransform?: DocumentTransform;
182188
// (undocumented)
@@ -587,6 +593,12 @@ interface DeleteModifier {
587593
// @public (undocumented)
588594
const _deleteModifier: unique symbol;
589595

596+
// @public (undocumented)
597+
interface DevtoolsOptions {
598+
enabled?: boolean;
599+
name?: string;
600+
}
601+
590602
// @public (undocumented)
591603
class DocumentTransform {
592604
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-testing.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
113113
get defaultContext(): Partial<DefaultContext>;
114114
// (undocumented)
115115
defaultOptions: DefaultOptions;
116+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
117+
//
118+
// (undocumented)
119+
readonly devtoolsConfig: DevtoolsOptions;
116120
// (undocumented)
117121
disableNetworkFetches: boolean;
118122
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
171175
interface ApolloClientOptions<TCacheShape> {
172176
assumeImmutableResults?: boolean;
173177
cache: ApolloCache<TCacheShape>;
178+
// @deprecated
174179
connectToDevTools?: boolean;
175180
// (undocumented)
176181
credentials?: string;
177182
// (undocumented)
178183
defaultContext?: Partial<DefaultContext>;
179184
defaultOptions?: DefaultOptions;
185+
devtools?: DevtoolsOptions;
180186
// (undocumented)
181187
documentTransform?: DocumentTransform;
182188
// (undocumented)
@@ -588,6 +594,12 @@ interface DeleteModifier {
588594
// @public (undocumented)
589595
const _deleteModifier: unique symbol;
590596

597+
// @public (undocumented)
598+
interface DevtoolsOptions {
599+
enabled?: boolean;
600+
name?: string;
601+
}
602+
591603
// @public (undocumented)
592604
class DocumentTransform {
593605
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

.api-reports/api-report-testing_core.api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
112112
get defaultContext(): Partial<DefaultContext>;
113113
// (undocumented)
114114
defaultOptions: DefaultOptions;
115+
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
116+
//
117+
// (undocumented)
118+
readonly devtoolsConfig: DevtoolsOptions;
115119
// (undocumented)
116120
disableNetworkFetches: boolean;
117121
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
@@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
170174
interface ApolloClientOptions<TCacheShape> {
171175
assumeImmutableResults?: boolean;
172176
cache: ApolloCache<TCacheShape>;
177+
// @deprecated
173178
connectToDevTools?: boolean;
174179
// (undocumented)
175180
credentials?: string;
176181
// (undocumented)
177182
defaultContext?: Partial<DefaultContext>;
178183
defaultOptions?: DefaultOptions;
184+
devtools?: DevtoolsOptions;
179185
// (undocumented)
180186
documentTransform?: DocumentTransform;
181187
// (undocumented)
@@ -587,6 +593,12 @@ interface DeleteModifier {
587593
// @public (undocumented)
588594
const _deleteModifier: unique symbol;
589595

596+
// @public (undocumented)
597+
interface DevtoolsOptions {
598+
enabled?: boolean;
599+
name?: string;
600+
}
601+
590602
// @public (undocumented)
591603
class DocumentTransform {
592604
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts

0 commit comments

Comments
 (0)