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

Throws error when using useGraphQlJit() plugin and request header Accept is not application/graphql-response+json, application/json, multipart/mixed #2967

Open
MrFoxPro opened this issue Aug 16, 2023 · 0 comments
Labels

Comments

@MrFoxPro
Copy link

Describe the bug

Result with application/graphql-response+json, application/json, multipart/mixed header

{
  errors: [
    {
      message: 'Variable "$otp" got invalid value "1234"; Expected type Int; Int cannot represent non-integer value: "1234"'
    }
  ]
}

Without:

ERR TypeError: Cannot read properties of undefined (reading 'originalError')
    at file:///project/sandbox/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js:22:60
    at Array.some (<anonymous>)
    at processRegularResult (file:///project/sandbox/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js:22:32)
    at processResult (file:///project/sandbox/node_modules/graphql-yoga/esm/process-request.js:31:12)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
ERR TypeError: Cannot read properties of undefined (reading 'originalError')
    at file:///project/sandbox/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js:22:60
    at Array.some (<anonymous>)
    at processRegularResult (file:///project/sandbox/node_modules/graphql-yoga/esm/plugins/result-processor/regular.js:22:32)
    at processResult (file:///project/sandbox/node_modules/graphql-yoga/esm/process-request.js:31:12)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
{ errors: [ { message: 'Unexpected error.', extensions: {} } ] }

Your Example Website or App

https://codesandbox.io/p/sandbox/reverent-cdn-hx5fy7?file=%2Fsrc%2Fmain.ts%3A11%2C28

Steps to Reproduce the Bug or Issue

Just run codesandbox

Expected behavior

I'm not sure btw. But it shouldn't be different from usage without useGraphqlJit()

Screenshots or Videos

No response

Platform

  • OS:Linux
  • NodeJS: from 16 to 20
  • @graphql-yoga/* version(s): 4.0.4

Additional context

No response

@MrFoxPro MrFoxPro changed the title Throws error when using useGraphQlJit() plugin and request header Accept has something different from application/graphql-response+json, application/json, multipart/mixed Throws error when using useGraphQlJit() plugin and request header Accept is not application/graphql-response+json, application/json, multipart/mixed Aug 16, 2023
This was referenced May 7, 2024
This was referenced May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants