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

@envelop/graphql-jit upgrade from 8.0.1 to 8.0.2 (or 8.0.3) breaks something in primitives parsing #2208

Closed
4 tasks
laurisvan opened this issue Apr 10, 2024 · 3 comments
Labels
kind/bug Something isn't working stage/0-issue-prerequisites Needs more information before we can start working on it

Comments

@laurisvan
Copy link

laurisvan commented Apr 10, 2024

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a
    minimal reproduction available on
    Stackblitz.
    • Please install the latest @envelop/* packages that you are using.
    • Please make sure the reproduction is as small as possible.
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

When doing a regular module update run, I upgraded my npm modules. When upgrading graphql-jit, after the run I got the following error:

Got unexpected PRIMITIVES type: DateTime"

I tried to enforce graphql-jit version in both tests, but for some reason overrides

    "@envelop/graphql-jit": {
      "graphql-jit": "0.8.6"
    },

did not matter which version got installed into package-lock.json. Therefore I cannot be sure whether the problem is in envelop plugin or graphql-jit itself. If we can somehow rule out that it is in envelop plugin, I am glad to close this one and file it into graphql-jit, instead.

I am not yet able to produce a minimum repro, but I believe it might be something with the interplay of custom scalars (the DateTime mentioned there is a custom scalar).

Our stack is rather large, so I am not sure where to start building steps to reproduce. Any hints woudl be appreciated.

To Reproduce Steps to reproduce the behavior:

Expected behavior

Environment:

  • OS:
  • NodeJS:
  • @envelop/* versions:
    • @envelop/core: 5.0.0
    • @envelop/graphql-jit: 8.01 -> 8.02 (and 8.03)

Additional context

@EmrysMyrddin EmrysMyrddin added kind/bug Something isn't working stage/0-issue-prerequisites Needs more information before we can start working on it labels Apr 10, 2024
@EmrysMyrddin
Copy link
Collaborator

Hi! Thank you for reaching out :-)

Without a reproduction case, it will be difficult to know what is going on here.

To make a reproduction, I would recommend beginning by creating a very simple Yoga server which is configured with graphql-jit plugin, you custom scalar, and a very simple schema with only one query which returns your custom scalar.

This way, you will be able to know if at least, the combination of this 3 elements are the source of the issue. Then, it will be much easier to explore what is going on :-)

@dnlsandiego
Copy link

I ran into this as well. It looks like an issue with graphql-jit zalando-incubator/graphql-jit#216 when using custom serializer and having a scalar like DateTime. In our usage, useGraphQlJit({ customJSONSerializer: true }), setting customJSONSerializer to false would fix the issue.

@laurisvan
Copy link
Author

I ran into this as well. It looks like an issue with graphql-jit zalando-incubator/graphql-jit#216 when using custom serializer and having a scalar like DateTime. In our usage, useGraphQlJit({ customJSONSerializer: true }), setting customJSONSerializer to false would fix the issue.

Thanks @dnlsandiego - sounds very much we can close it from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working stage/0-issue-prerequisites Needs more information before we can start working on it
Projects
None yet
Development

No branches or pull requests

3 participants