Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Error when handling resolver error #30

Closed
chess777 opened this issue Dec 10, 2019 · 7 comments
Closed

Error when handling resolver error #30

chess777 opened this issue Dec 10, 2019 · 7 comments

Comments

@chess777
Copy link

On graphql-tools-fork v7.2.2 I get a following error:

ReferenceError: context is not defined
    at <Path>\node_modules\graphql-tools-fork\src\stitching\checkResultAndHandleErrors.ts:110:5
    at Array.map (<anonymous>)
    at handleList (<Path>\node_modules\graphql-tools-fork\src\stitching\checkResultAndHandleErrors.ts:104:15)
    at Object.handleResult (<Path>\node_modules\graphql-tools-fork\src\stitching\checkResultAndHandleErrors.ts:73:12)
    at defaultMergedResolver (<Path>\node_modules\graphql-tools-fork\src\stitching\defaultMergedResolver.ts:33:10)
    at field.resolve (<Path>\node_modules\graphql-tools-fork\src\stitching\mergeSchemas.ts:248:16)
    at field.resolve (<Path>\node_modules\graphql-extensions\src\index.ts:274:18)
    at resolveFieldValueOrError (<Path>\node_modules\graphql\execution\execute.js:467:18)
    at resolveField (<Path>\node_modules\graphql\execution\execute.js:434:16)
    at executeFields (<Path>\node_modules\graphql\execution\execute.js:275:18)
    at collectAndExecuteSubfields (<Path>\node_modules\graphql\execution\execute.js:713:10)
    at completeObjectValue (<Path>\node_modules\graphql\execution\execute.js:703:10)
    at completeValue (<Path>\node_modules\graphql\execution\execute.js:591:12)
    at completeValue (<Path>\node_modules\graphql\execution\execute.js:557:21)
    at <Path>\node_modules\graphql\execution\execute.js:492:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Function handleList does not have context defined.

@yaacovCR
Copy link
Owner

Huh. Seems like my lint settings must be off!

@yaacovCR
Copy link
Owner

tslint thought it was the mocha context?

might be fixed by v7.2.3

@macrozone
Copy link

@yaacovCR same error happens on 8.5.0 but i just blindly replaced graphql-tools with graphql-tools-fork so there might be some breaking change that i did not see

@yaacovCR
Copy link
Owner

yaacovCR commented Feb 3, 2020

Can you include a stack trace?

@yaacovCR yaacovCR reopened this Feb 3, 2020
@macrozone
Copy link

@yaacovCR on it.

buildDelegationTransforms is missing passing context. you should really fix your linter ;-)

@yaacovCR
Copy link
Owner

yaacovCR commented Feb 3, 2020

Lol, can you please submit PRs that fixes this issue and the linter/test setup.

Otherwise I can handle the first tonight, use v8.4.0 in the meantime, second I am not so sure how!

Thanks!

yaacovCR added a commit that referenced this issue Feb 4, 2020
Closes #30. Again. Not sure if eslint will work better than tslint in terms of this.
yaacovCR added a commit that referenced this issue Feb 13, 2020
permanently fixes #30
aligns style rules with upstream graphql
yaacovCR added a commit that referenced this issue Feb 17, 2020
Closes #30. Again. Not sure if eslint will work better than tslint in terms of this.
yaacovCR added a commit that referenced this issue Feb 17, 2020
permanently fixes #30
aligns style rules with upstream graphql
yaacovCR added a commit that referenced this issue Feb 27, 2020
Closes #30. Again. Not sure if eslint will work better than tslint in terms of this.
yaacovCR added a commit that referenced this issue Feb 27, 2020
permanently fixes #30
aligns style rules with upstream graphql
yaacovCR added a commit that referenced this issue Mar 26, 2020
Closes #30. Again. Not sure if eslint will work better than tslint in terms of this.
yaacovCR added a commit that referenced this issue Mar 26, 2020
permanently fixes #30
aligns style rules with upstream graphql
yaacovCR added a commit that referenced this issue Mar 26, 2020
Closes #30. Again. Not sure if eslint will work better than tslint in terms of this.
yaacovCR added a commit that referenced this issue Mar 26, 2020
permanently fixes #30
aligns style rules with upstream graphql
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants