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

Issue with graphql-jit #554

Closed
numToStr opened this issue Feb 29, 2020 · 6 comments
Closed

Issue with graphql-jit #554

numToStr opened this issue Feb 29, 2020 · 6 comments
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved

Comments

@numToStr
Copy link

Describe the bug
So, I am using type-graphql with fastify-gql with has support for graphql-jit.
When I enable jit in fastify-gql, first-time everything works fine, but second time I use a mutation with returns a Union. I get the error below.

Abstract type <Name>Union must resolve to an Object type at runtime for field Mutation.<Mutation_Name>. Either the <Name>Union type should provide a \"resolveType\" function or each possible types should provide an \"isTypeOf\" function.

This error only comes when a mutation returns a Union. Other than that every mutation works fine.
But when I disable the jit, everything works fine. I don't know if this is type-graphql specific error or graphql-jit error.

BTW, thanks for this awesomee lib ❤️

Enviorment (please complete the following information):

  • OS: Linux 5.5
  • Node: ^12.16.0
  • Package version: ^0.18.0-beta.10
  • TypeScript version: ^3.8.2
  • fastify: ^2.12.0
  • fastify-gql: ^3.0.6
@MichalLytek
Copy link
Owner

I don't know if this is type-graphql specific error or graphql-jit error.

If something works without JIT, it's a problem with graphql-jit. To achieve high speed they make some shortcuts and some contstructs that are legal in graphql-js execution might not work in graphql-jit.

Please open an issue on their repo and then try to find a cause of this issue - maybe we can make some workaround for that case.

@MichalLytek MichalLytek added Need More Info 🤷‍♂️ Further information is requested Question ❔ Not future request, proposal or bug issue labels Feb 29, 2020
@numToStr
Copy link
Author

Thanks for the explanation. I will open an issue on their repo.

@MichalLytek
Copy link
Owner

Closing for a housekeeping purposes 🔒

@MichalLytek MichalLytek added Solved ✔️ The issue has been solved and removed Need More Info 🤷‍♂️ Further information is requested labels May 3, 2020
@rfgamaral
Copy link

rfgamaral commented May 4, 2020

I'm interested in this as well. Have you opened an issued already @numToStr? Can you please link it here? I can't find it.

@StarpTech
Copy link

StarpTech commented May 27, 2021

Hi, we run into the same limitation it would great to find out what's wrong to open a detailed error report in graphql-jit.

@StarpTech
Copy link

Can we address this zalando-incubator/graphql-jit#69?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved
Projects
None yet
Development

No branches or pull requests

4 participants