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 diff --git a/.changeset/weak-ads-develop.md b/.changeset/weak-ads-develop.md new file mode 100644 index 00000000000..2499c7cb871 --- /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 [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). diff --git a/src/testing/experimental/createSchemaFetch.ts b/src/testing/experimental/createSchemaFetch.ts index fe253f98899..9f018156cf1 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 [`@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 5a4002c2902..e07dd923e4e 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 [`@apollo/graphql-testing-library`](https://github.com/apollographql/graphql-testing-library). */ const createTestSchema = ( schemaWithTypeDefs: GraphQLSchema,