Maximum call stack size exceeded
See original GitHub issueI have to use the null
as value in mutations. Therefore I cloned the repository and packaged it.
Now in parse.js
line 488 in the function parseValueLiteral
accepts null as value. But when I use it in the browser i get the error:
RangeError: Maximum call stack size exceeded
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:77:19)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
at stripLoc (https://localhost:9000/lib/graphql-tag/browser.js:105:26)
To use Graphql-tag in the browser I used browserify (browserify index.js --standalone graphqlTag -o=browser.js
).
In my file line 77 is:function stripLoc (doc, removeLocAtThisLevel) {
.
Line 105 is
if (valueType === '[object Object]' || valueType === '[object Array]') {
doc[keys[key]] = stripLoc(value, true);
}
in function stripLoc
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >Uncaught RangeError: Maximum call ... - Net-Informations.Com
Maximum call stack size exceeded error ... This error is almost always means you have a problem with recursion in JavaScript code, as...
Read more >RangeError: Maximum call stack size exceeded in JavaScript
The "RangeError: Maximum call stack size exceeded" error occurs when a function is called so many times that the invocations exceed the call...
Read more >Maximum Call Stack Size Exceeded (Typescript Error) - Medium
Scenario for Maximum Call Stack Size Exceeded Error ... In your code, the possibility is, You are calling a function that is calling...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Further investigation got me to the point that I noticed that with the now graphql version, the property
loc
has to new propertiesstartToken
andendToken
. Both are of the typeTok
.Tok
has the propertiesnext
andprevious
which point to anotherTok
with these two properties. This is the point where the infinite loop appears.My workaround is to store the properties
startToken
andendToken
in local variables and attach it after the for loop again.I will make an pull request where you can see the problem.
Now I get the error in apollo-client, I will look for that later.
this should be resolved as part of
graphql-tag@v1.3.0