envelop icon indicating copy to clipboard operation
envelop copied to clipboard

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

Open laurisvan opened this issue 1 year ago • 1 comments

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

laurisvan avatar Apr 10 '24 19:04 laurisvan

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 :-)

EmrysMyrddin avatar Apr 10 '24 20:04 EmrysMyrddin

I ran into this as well. It looks like an issue with graphql-jit https://github.com/zalando-incubator/graphql-jit/issues/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.

dnlsandiego avatar May 01 '24 19:05 dnlsandiego

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.

laurisvan avatar May 05 '24 19:05 laurisvan