Skip to content

TS: remove TS-specific TSource argument for resolveFieldValueOrError #2491

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

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Changes from all 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
17 changes: 10 additions & 7 deletions src/execution/execute.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,18 @@ export function buildResolveInfo(
path: Path,
): GraphQLResolveInfo;

// Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField`
// function. Returns the result of resolveFn or the abrupt-return Error object.
// TS_SPECIFIC: TSource
export function resolveFieldValueOrError<TSource>(
/**
* Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField`
* function. Returns the result of resolveFn or the abrupt-return Error object.
*
* @internal
*/
export function resolveFieldValueOrError(
exeContext: ExecutionContext,
fieldDef: GraphQLField<TSource, any>,
fieldDef: GraphQLField<any, any>,
fieldNodes: ReadonlyArray<FieldNode>,
resolveFn: GraphQLFieldResolver<TSource, any>,
source: TSource,
resolveFn: GraphQLFieldResolver<any, any>,
source: any,
info: GraphQLResolveInfo,
): Error | any;

Expand Down