-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
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
module Notifications = [%graphql {|
query Notifications($limit: Int) {
notifications(limit: $limit) {
id
createdAt {
notification {
... on TypeA {
aField
}
... on TypeB {
bField
matches {
... on MatchC {
cField
}
... on MatchD {
dField
}
}
}
}
}
}
}
|}];
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 error
Fatal error: exception Failure("graphql_ppx/ppx\\ -verbose not found when resolving ppx-flags")
johnhampton