Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate experimental testing utilities #11930

Merged
merged 6 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .api-reports/api-report-testing_experimental.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?: {
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .changeset/weak-ads-develop.md
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 2 additions & 0 deletions src/testing/experimental/createSchemaFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/testing/experimental/createTestSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want the repo name here or the npm package name which is @apollo/graphql-testing-library. I have a slight preference for the latter but either works :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good callout! I agree, the package name seems more reasonable. I've updated it with 7b6c071. Thanks!

*/
const createTestSchema = (
schemaWithTypeDefs: GraphQLSchema,
Expand Down
Loading