-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move new testing utilities to their own entrypoint (#11783)
- Loading branch information
Showing
15 changed files
with
104 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
## API Report File for "@apollo/client" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
/// <reference types="node" /> | ||
|
||
import type { FieldNode } from 'graphql'; | ||
import type { FragmentDefinitionNode } from 'graphql'; | ||
import type { GraphQLSchema } from 'graphql'; | ||
|
||
// @alpha | ||
export const createSchemaFetch: (schema: GraphQLSchema, mockFetchOpts?: { | ||
validate: boolean; | ||
}) => ((uri: any, options: any) => Promise<Response>) & { | ||
mockGlobal: () => { | ||
restore: () => void; | ||
} & Disposable; | ||
}; | ||
|
||
// 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 | ||
export const createTestSchema: (schemaWithTypeDefs: GraphQLSchema, options: TestSchemaOptions) => ProxiedSchema; | ||
|
||
// @public | ||
interface FragmentMap { | ||
// (undocumented) | ||
[fragmentName: string]: FragmentDefinitionNode; | ||
} | ||
|
||
// Warning: (ae-forgotten-export) The symbol "TestSchemaFns" needs to be exported by the entry point index.d.ts | ||
// | ||
// @public (undocumented) | ||
type ProxiedSchema = GraphQLSchema & TestSchemaFns; | ||
|
||
// @public (undocumented) | ||
type Resolver = (rootValue?: any, args?: any, context?: any, info?: { | ||
field: FieldNode; | ||
fragmentMap: FragmentMap; | ||
}) => any; | ||
|
||
// @public (undocumented) | ||
interface Resolvers { | ||
// (undocumented) | ||
[key: string]: { | ||
[field: string]: Resolver; | ||
}; | ||
} | ||
|
||
// @public (undocumented) | ||
interface TestSchemaFns { | ||
// (undocumented) | ||
add: (addOptions: { | ||
resolvers: Resolvers; | ||
}) => ProxiedSchema; | ||
// (undocumented) | ||
fork: (forkOptions?: { | ||
resolvers?: Resolvers; | ||
}) => ProxiedSchema; | ||
// (undocumented) | ||
reset: () => void; | ||
} | ||
|
||
// @public (undocumented) | ||
interface TestSchemaOptions { | ||
// (undocumented) | ||
resolvers: Resolvers; | ||
// (undocumented) | ||
scalars?: { | ||
[key: string]: any; | ||
}; | ||
} | ||
|
||
// Warnings were encountered during analysis: | ||
// | ||
// src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts | ||
// src/core/types.ts:203:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts | ||
// src/testing/experimental/createTestSchema.ts:10:23 - (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@apollo/client": minor | ||
--- | ||
|
||
Moves new testing utilities to their own entrypoint, `testing/experimental` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/testing/core/createTestSchema.ts → src/testing/experimental/createTestSchema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { createTestSchema } from "./createTestSchema.js"; | ||
export { createSchemaFetch } from "./createSchemaFetch.js"; |