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
An error is thrown if a query hits the defined maxDepth, but there are only fields with children to choose from. Choosing such a field but then not choosing a sub-field for it (due to the maxDepth constraint) would result in an invalid query and thus causes this library to throw an error.
The text was updated successfully, but these errors were encountered:
#9 Will address this issue by adding the meta field __typefield however I have concerns about this will be a confusing change to our users. Normally __typefield will be added as a part of union and interface use cases however, in this case, we will be adding the meta field wherever necessary.
I believe that this is still a good change overall but I think in future, we should look into properly solving the issue by recursively ensuring that there are fields that can be added without violating the maxDepth rule.
Would it be possible to add an option to soft-enforce the maxDepth rule for this case? Otherwise it's difficult to run random queries as an automated fuzz testing suite, because the tests hard fail randomly.
@alexkrolick I'm currently working on a number of other projects so it is difficult for me to look at this right now.
We have experienced problems due to this issue and in the past, one of our workarounds was to simply create a helper function that wraps the query generator in a try/catch block and a while loop. I know this is far from ideal but until I can find some time to look into this issue, I will have to rely on external contributions to help resolve this issue.
An error is thrown if a query hits the defined
maxDepth
, but there are only fields with children to choose from. Choosing such a field but then not choosing a sub-field for it (due to themaxDepth
constraint) would result in an invalid query and thus causes this library to throw an error.The text was updated successfully, but these errors were encountered: