From 17dd3bd39ed652875238583cba8a02b2c8d55e36 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 5 Jul 2024 15:48:59 -0600 Subject: [PATCH 1/5] Add deprecations to experimental testing utilities --- src/testing/experimental/createSchemaFetch.ts | 2 ++ src/testing/experimental/createTestSchema.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/testing/experimental/createSchemaFetch.ts b/src/testing/experimental/createSchemaFetch.ts index 5c03ea0da0d..2797a707a06 100644 --- a/src/testing/experimental/createSchemaFetch.ts +++ b/src/testing/experimental/createSchemaFetch.ts @@ -30,6 +30,8 @@ import { wait } from "../core/wait.js"; * ``` * @since 3.10.0 * @alpha + * @deprecated `createSchemaFetch` is deprecated and will be removed in 3.12.0. + * Please migrate to [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). */ const createSchemaFetch = ( schema: GraphQLSchema, diff --git a/src/testing/experimental/createTestSchema.ts b/src/testing/experimental/createTestSchema.ts index 5a4002c2902..870650af724 100644 --- a/src/testing/experimental/createTestSchema.ts +++ b/src/testing/experimental/createTestSchema.ts @@ -50,6 +50,8 @@ interface TestSchemaOptions { * ``` * @since 3.9.0 * @alpha + * @deprecated `createTestSchema` is deprecated and will be removed in 3.12.0. + * Please migrate to [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). */ const createTestSchema = ( schemaWithTypeDefs: GraphQLSchema, From e55b57ea6b4e2dc1a0a93f29c1fc2194fc65b4ea Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 5 Jul 2024 15:53:48 -0600 Subject: [PATCH 2/5] Add changeset --- .changeset/weak-ads-develop.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/weak-ads-develop.md diff --git a/.changeset/weak-ads-develop.md b/.changeset/weak-ads-develop.md new file mode 100644 index 00000000000..c2fe13624ad --- /dev/null +++ b/.changeset/weak-ads-develop.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). From 10d2a676f6bb9fe4bbb473e4c42d354891a56c97 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Fri, 5 Jul 2024 15:56:23 -0600 Subject: [PATCH 3/5] Update api report --- .api-reports/api-report-testing_experimental.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.api-reports/api-report-testing_experimental.api.md b/.api-reports/api-report-testing_experimental.api.md index 97af4a043cf..330f543fc64 100644 --- a/.api-reports/api-report-testing_experimental.api.md +++ b/.api-reports/api-report-testing_experimental.api.md @@ -8,7 +8,7 @@ import type { FieldNode } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; import type { GraphQLSchema } from 'graphql'; -// @alpha +// @alpha @deprecated export const createSchemaFetch: (schema: GraphQLSchema, mockFetchOpts?: { validate?: boolean; delay?: { @@ -24,7 +24,7 @@ export const createSchemaFetch: (schema: GraphQLSchema, mockFetchOpts?: { // Warning: (ae-forgotten-export) The symbol "TestSchemaOptions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ProxiedSchema" needs to be exported by the entry point index.d.ts // -// @alpha +// @alpha @deprecated export const createTestSchema: (schemaWithTypeDefs: GraphQLSchema, options: TestSchemaOptions) => ProxiedSchema; // @public From 7b6c07183daadf518424f0f521ca388b5f2fb73c Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 9 Jul 2024 11:40:28 -0600 Subject: [PATCH 4/5] Use proper package name in deprecation message --- src/testing/experimental/createSchemaFetch.ts | 2 +- src/testing/experimental/createTestSchema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testing/experimental/createSchemaFetch.ts b/src/testing/experimental/createSchemaFetch.ts index 2797a707a06..531197a86cc 100644 --- a/src/testing/experimental/createSchemaFetch.ts +++ b/src/testing/experimental/createSchemaFetch.ts @@ -31,7 +31,7 @@ import { wait } from "../core/wait.js"; * @since 3.10.0 * @alpha * @deprecated `createSchemaFetch` is deprecated and will be removed in 3.12.0. - * Please migrate to [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). + * Please migrate to [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). */ const createSchemaFetch = ( schema: GraphQLSchema, diff --git a/src/testing/experimental/createTestSchema.ts b/src/testing/experimental/createTestSchema.ts index 870650af724..e07dd923e4e 100644 --- a/src/testing/experimental/createTestSchema.ts +++ b/src/testing/experimental/createTestSchema.ts @@ -51,7 +51,7 @@ interface TestSchemaOptions { * @since 3.9.0 * @alpha * @deprecated `createTestSchema` is deprecated and will be removed in 3.12.0. - * Please migrate to [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). + * Please migrate to [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). */ const createTestSchema = ( schemaWithTypeDefs: GraphQLSchema, From 3542d089f96945507d6422a3980fdc9f7fe2c95f Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Tue, 9 Jul 2024 11:41:59 -0600 Subject: [PATCH 5/5] Update changeset --- .changeset/weak-ads-develop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/weak-ads-develop.md b/.changeset/weak-ads-develop.md index c2fe13624ad..2499c7cb871 100644 --- a/.changeset/weak-ads-develop.md +++ b/.changeset/weak-ads-develop.md @@ -2,4 +2,4 @@ "@apollo/client": minor --- -Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). +Deprecates experimental schema testing utilities introduced in 3.10 in favor of recommending [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library).