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

remove dead argument to unwrapResult #1484

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/delegate/src/createMergedResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function createMergedResolver({

const unwrappingResolver: IFieldResolver<any, any> =
fromPath != null
? (parent, args, context, info) => parentErrorResolver(unwrapResult(parent, info, fromPath), args, context, info)
? (parent, args, context, info) => parentErrorResolver(unwrapResult(parent, fromPath), args, context, info)
: parentErrorResolver;

const dehoistingResolver: IFieldResolver<any, any> = dehoist
Expand Down
4 changes: 2 additions & 2 deletions packages/delegate/src/proxiedResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GraphQLError, GraphQLResolveInfo } from 'graphql';
import { GraphQLError } from 'graphql';

import { mergeDeep, ERROR_SYMBOL, relocatedError, setErrors, getErrors } from '@graphql-tools/utils';

Expand All @@ -12,7 +12,7 @@ export function isProxiedResult(result: any) {
return result != null ? result[ERROR_SYMBOL] : result;
}

export function unwrapResult(parent: any, info: GraphQLResolveInfo, path: Array<string>): any {
export function unwrapResult(parent: any, path: Array<string>): any {
let newParent: any = parent;
const pathLength = path.length;
for (let i = 0; i < pathLength; i++) {
Expand Down