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

Export internal Executor class for experimentation #3302

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/execution/executor.ts
Expand Up @@ -138,6 +138,16 @@ export interface ExecutionArgs {
}

/**
* Executor class responsible for implementing the Execution section of the GraphQL spec.
*
* This class is exported only to assist people in implementing their own executors
* without duplicating too much code and should be used only as last resort for cases
* such as experimental syntax or if certain features could not be contributed upstream.
*
* It is still part of the internal API and is versioned, so any changes to it are never
* considered breaking changes. If you still need to support multiple versions of the
* library, please use the `versionInfo` variable for version detection.
*
* @internal
*/
export class Executor {
Expand Down
2 changes: 2 additions & 0 deletions src/execution/index.ts
Expand Up @@ -8,6 +8,8 @@ export type {
FormattedExecutionResult,
} from './executor';

export { Executor } from './executor';

export { execute, executeSync } from './execute';

export { subscribe, createSourceEventStream } from './subscribe';
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Expand Up @@ -306,6 +306,7 @@ export type {

/** Execute GraphQL queries. */
export {
Executor,
execute,
executeSync,
defaultFieldResolver,
Expand Down