n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
777 stars 126 forks source link

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

Closed laurisvan closed 4 months ago

laurisvan commented 4 months ago

Issue workflow progress

Progress of the issue based on the Contributor Workflow


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:

Additional context

EmrysMyrddin commented 4 months ago

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 commented 4 months ago

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.

laurisvan commented 4 months ago

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.