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
The add query functionality does not work and hangs the application in certain conditions.
This should be addressed.
Expected Behavior
Adding a query should always work, else the button shouldn't be there.
Current Behavior
For some graphQL servers, when you click the "Add Query" button, the application hangs.
Possible Solution
The likely culprit is because of an infinite recursive loop. If the recursion is unending, a maximum depth limit can be set. It is not likely that a user would want to add a query with more than 50 (random number) depth fields, for instance.
Steps to Reproduce (for bugs)
Enter a valid graphQL server URL with introspection enabled.
Open the docs
Click the "Add Query" button that appears when you hover over a query.
Context
Your Environment
Version used:
Environment name and version (e.g. Chrome 39, node.js 5.4):
Operating System and version (desktop or mobile):
Link to your project:
The text was updated successfully, but these errors were encountered:
It turns out the problem comes from codemirror trying to lint the query added to the editor. That might not be the only reason but looking through the call stack, it appears the recursive functions completed successfully and returned the data to codemirror. For now, I will set the depth limit to a conderable number (3) and would later add the ability to allow the user to modify the depth level, with a warning (of course) about the repercussion of doing that.
It turns out in some cases, that the query added even with a depth limit of 3 is still too much for codemirror linting to handle. Weird. I might have to disable the feature depending on the size of the index.
for now.
Should try to increase it a little more for the user.
Another approach would be to make a decision on the depth level based on
the size of the search index.
The add query functionality does not work and hangs the application in certain conditions.
This should be addressed.
Expected Behavior
Adding a query should always work, else the button shouldn't be there.
Current Behavior
For some graphQL servers, when you click the "Add Query" button, the application hangs.
Possible Solution
The likely culprit is because of an infinite recursive loop. If the recursion is unending, a maximum depth limit can be set. It is not likely that a user would want to add a query with more than 50 (random number) depth fields, for instance.
Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: