-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
Custom resolvers killing server #1024
Comments
This is the same issue with [resolverKey]: fields[fieldName][resolverKey],
// [resolverKey]: createDelegatingResolver(
// schema,
// operationName,
// fieldName,
// ), No memory issues and no timeouts. A |
The problem here is that you are replacing the id field with an id fragment that contains an id field, which causes an infinite loop. This could be fixed by replacing as one leaves a node rather than as one enters, but not sure if worth it, as fragments should not contain the containing field. Perhaps they should be validated as such, but probably easier just to allow without recursion. Rolling into #1306 |
Moving to v5.1, reopening to move any relevant discussion here. |
We have moved to selectionSet hints rather than fragment hints, so we won't be pursuing a fix here, but PRs with one by the community will still be accepted if anyone has time to submit. |
Dependencies
I have a remote schema which returns not relay compatible
ID
, I'm trying to write my own resolvers to generate the properID
with help ofmergeSchemas
. But apollo server just dying withJavaScript heap out of memory
error.I was able to replicate the issue by using schema stitching basic example where I just trying to return id without modifying it and resolvers never even called.
Intended outcome: It'd return id or throw some error if something done incorect
Actual outcome: Server dying with
JavaScript heap out of memory
errorHow to reproduce the issue: clone repo and try to run this query:
P.S.: Probably there are bettwer aproaches to do it. But, anyways I think
heap out of memory
is not expected result :-)The text was updated successfully, but these errors were encountered: