-
Notifications
You must be signed in to change notification settings - Fork 42
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
Nested Unions makes compiler hang #61
Comments
I haven't done any profiling on larger schemas so it's unfortunately possible that there are accidentally quadratic behaviors lurking here and there. Regarding your schema:
|
There's (very roughly) about 150-ish object types in the schema. For the second question: Do you mean just the union objects themselves or do you mean how many types are being selected in the unions? If it's the former then the |
Can you give any pointers on how to diagnose this issue? I've now encountered it in queries with only a single union. I wanted to try to diagnose it by setting the -verbose flag in bsconfig.json following the example given for -ast-out, but that just produced an error
|
I am facing similar issue where a query could take around 40s to compile. If you want to reproduce use this server https://dame.bio/graphql and try the following query
Notes
Hope this will help to trace the source of the issue. |
@MoOx Is this still an issue for you? I cannot replicate with the provided query and server -- the query compiles instantly. I'm not sure if something changed on the server, so it would be great if you could provide the @mbirkegaard Can you provide a |
With nested queries the code was switching on the option so that it could display a custom message. This was causing a massive increase in compilation time as the queries got deeper and wider. In my project we were seeing build times of about 6 minutes, after this change the build went down to about 10-11 seconds. Instead of displaying a custom message, the PPX will now just call out to `Js.Option.getExn`. This might also fix mhallin#61
…n#61) * fix: drop env based configuration * fix: drop env based configuration in favor of ppx-flags based
I'm having an issue with GraphQL queries with nested unions causing the compiler to hang.
I'm trying to do something like the following
If I remove the
matches
field, the query compiles in a few seconds (which seems a bit slow compared to normal).I can't quite figure out whether this is an unsupported feature mentioned in the README but I wouldn't think so, given that it's normal unions of objects all the way down.
I wanted to try to diagnose it by setting the -verbose flag in
bsconfig.json
following the example given for-ast-out
, but that just produced an errorThe text was updated successfully, but these errors were encountered: