Skip to content

Commit

Permalink
Add ability to configure a name for the client for use with devtools (#…
Browse files Browse the repository at this point in the history
…11936)

Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
  • Loading branch information
jerelmiller and phryneas authored Jul 9, 2024
1 parent 602a678 commit 1b23337
Show file tree
Hide file tree
Showing 15 changed files with 201 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
get documentTransform(): DocumentTransform;
Expand Down Expand Up @@ -144,12 +148,14 @@ export class ApolloClient<TCacheShape> implements DataProxy {
export interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -593,6 +599,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
export type DiffQueryAgainstStoreOptions = ReadQueryOptions & {
returnPartialData?: boolean;
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<Context>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<Context>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -680,6 +686,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -172,12 +176,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -623,6 +629,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_context.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -618,6 +624,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_hoc.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -616,6 +622,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_hooks.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -646,6 +652,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_internal.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -631,6 +637,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-react_ssr.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -587,6 +593,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-testing.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -171,12 +175,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -588,6 +594,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions .api-reports/api-report-testing_core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class ApolloClient<TCacheShape> implements DataProxy {
get defaultContext(): Partial<DefaultContext>;
// (undocumented)
defaultOptions: DefaultOptions;
// Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly devtoolsConfig: DevtoolsOptions;
// (undocumented)
disableNetworkFetches: boolean;
// Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts
Expand Down Expand Up @@ -170,12 +174,14 @@ class ApolloClient<TCacheShape> implements DataProxy {
interface ApolloClientOptions<TCacheShape> {
assumeImmutableResults?: boolean;
cache: ApolloCache<TCacheShape>;
// @deprecated
connectToDevTools?: boolean;
// (undocumented)
credentials?: string;
// (undocumented)
defaultContext?: Partial<DefaultContext>;
defaultOptions?: DefaultOptions;
devtools?: DevtoolsOptions;
// (undocumented)
documentTransform?: DocumentTransform;
// (undocumented)
Expand Down Expand Up @@ -587,6 +593,12 @@ interface DeleteModifier {
// @public (undocumented)
const _deleteModifier: unique symbol;

// @public (undocumented)
interface DevtoolsOptions {
enabled?: boolean;
name?: string;
}

// @public (undocumented)
class DocumentTransform {
// Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts
Expand Down
Loading

0 comments on commit 1b23337

Please sign in to comment.