You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into a compatibility issue with Graphql Code Generator and Lighthouse.
When using Graphql Code Generator on Lighthouse, the library unidic (which got updated at some point) fails to load the introspection schema due to it not having a Content-Length header.
Maybe lighthouse could return Content-Length for the introspection query?
Might be a way (user agent?) to tell if it is from Graphql Code Generator.
I had a work-around for this, but maybe it can be made more specific to just the introspection query now that I think about it further, but i'm not sure where abouts in Lighthouse code to put such a thing.
Have Lighthouse on Laravel running using sail docker container.
Try to generate schema using code generator with it downloading the schema from the server directly.
Output/Logs
Logs are not relevant to lighthouse here, it is an issue with a dependency used in a third-party tool.
Lighthouse behaves perfectly fine in other tools and Graphql Playground for example.
Lighthouse Version
Observed on Lighthouse v5.61.0 but probably not caused by Lighthouse directly as it had worked perfectly fine before the undici dependency got updated in code generator.
The text was updated successfully, but these errors were encountered:
It looks like unidic is going to fix how they handle server responses, see nodejs/undici#1414.
Adding the Content-Length header seems like the responsibility of the Laravel framework, we are just using its facilities as plain as it can be to respond with JSON, see
Describe the bug
Ran into a compatibility issue with Graphql Code Generator and Lighthouse.
When using Graphql Code Generator on Lighthouse, the library unidic (which got updated at some point) fails to load the introspection schema due to it not having a Content-Length header.
Related
dotansimha/graphql-code-generator#7934
nodejs/undici#1414
Expected behavior/Solution
Maybe lighthouse could return Content-Length for the introspection query?
Might be a way (user agent?) to tell if it is from Graphql Code Generator.
I had a work-around for this, but maybe it can be made more specific to just the introspection query now that I think about it further, but i'm not sure where abouts in Lighthouse code to put such a thing.
https://gist.github.com/LiamKarlMitchell/18f1e43ae6b772864d1b6a6ec1f71ba9
Steps to reproduce
Output/Logs
Logs are not relevant to lighthouse here, it is an issue with a dependency used in a third-party tool.
Lighthouse behaves perfectly fine in other tools and Graphql Playground for example.
Lighthouse Version
Observed on Lighthouse v5.61.0 but probably not caused by Lighthouse directly as it had worked perfectly fine before the undici dependency got updated in code generator.
The text was updated successfully, but these errors were encountered: