This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Maximum call stack size exceeded, possibly due to self-referencing type #44
Comments
mterrel
added a commit
to mterrel/relay-compiler-language-typescript
that referenced
this issue
Apr 26, 2018
Issue was caused by a GraphQL type that references itself: When transforming input types, transformNonNullableInputType would recursively expand each member field...infinitely. Fix is to transform fields of objects that have a non-scalar type into a reference to the type instead of an inline expansion of the type. Then, we output the object types as a separate step, similar to how enum types are done.
I just created a pull request that fixes the issue for me. I wasn't familiar enough with the structure of the current unit tests to easily add a new test case that specifically covers the self-referencing type issue described here. However, the existing snapshot unit tests do cover the new format of the output. |
mterrel
added a commit
to mterrel/relay-compiler-language-typescript
that referenced
this issue
Apr 26, 2018
Issue was caused by a GraphQL type that references itself: When transforming input types, transformNonNullableInputType would recursively expand each member field...infinitely. Fix is to transform fields of objects that have a non-scalar type into a reference to the type instead of an inline expansion of the type. Then, we output the object types as a separate step, similar to how enum types are done.
I've hit this one as well and can confirm it's a problem with self referencing types |
Apologies for how long it took me to find the time. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I run relay-compiler while using this plugin to generate TypeScript output, I get the following output and error:
Although I haven't yet created a minimal repro of the issue, the crash is caused when I use a particular type as input parameter to a query. The query is:
And the DbRepoFilter type (which is auto-generated by Postgraphile) is:
If this info isn't sufficient, let me know and I can try to create a simpler and more self-contained repro.
The text was updated successfully, but these errors were encountered: