Open yourbuddyconner opened 9 months ago
Hey, which version of ariadne-codegen
are you using? Could you also provide the schema used to generate your client, or another schema that reproduces the exception?
I updated the library I was using to 0.11 to be sure and it manifested the same behavior.
Unfortunately, this is an internal API I can't share details of publicly, but I am going to do some digging and review the schema and see what could be self-referential and revert back with thoughts.
Hello! I am facing exactly the same issue with TypeGraphQL+Prisma generated API.
RecursionError: maximum recursion depth exceeded while calling a Python object
The only solution for me is to go back to 0.7.0, where it works ok, but every version above up until 0.11.0 would throw this error. I will try to provide simplified schema and example operation to reproduce
I have made a small investigation, and it seems that starting from a certain level of complexity of the schema this error just happens. Though, this time I was able to get a little bit better error message:
RecursionError: maximum recursion depth exceeded in __instancecheck__
Most probably it could be resolved by setting higher recursion limit somewhere in the code, like:
import sys sys.setrecursionlimit(10000)
Here is a little reproduction I was able to make: https://github.com/hermanmitish/ariadne-repro
Thank you for this reproduction. I'll give it a look but just the "too big schema causes problems" observation seems to point that we need to change recursive algorithm to linear one 🤔
Interesting... Poked this again today, and messed with the recursion limit setting -- still seeing a recursion error which indicates to me I might have a circular relationship in my DB schema, which theoretically should be fine because I set the field resolution depth to 3 on my backend, but I suspect it messes with the way you're rendering the pydantic types.
I suspect a switch to a linear algorithm might address both issues.
Hey there!
I am testing out ariadne-codegen against a TypeGraphQL-generated API and am seeing issues at runtime that look pretty similar to #100.
I have a node SDK which uses GraphQL Codegen that handles this API just fine so thinking there's a bug in this library somewhere that is interacting weirdly with my schema.