Skip to content

Commit

Permalink
Export internal Executor class for experimentation
Browse files Browse the repository at this point in the history
This class, similar to the Parser 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.
  • Loading branch information
yaacovCR committed Oct 7, 2021
1 parent ab2c1f2 commit 81072df
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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

0 comments on commit 81072df

Please sign in to comment.