-
Notifications
You must be signed in to change notification settings - Fork 248
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
Interface type explosion causes error on query #2935
Comments
Thanks for opening this. I'm moving this to the |
As questions which could be worth understanding that I don't see provided:
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Attempting to query an interface with many implementations results in an error.
To Reproduce
We have an interface (
FactoryUnit
) with more than 70 implementations. It's defined as follows:We try to run the following query, which gives an error:
Query:
Expected behavior
It should not return an error when querying.
Output
Desktop (please complete the following information):
macOS Monterey, but issue also visible on the server running Alpine Linux 3.16
Additional context
We've traced this issue to the following function in Apollo Federation, which appears to be a function with exponential time and space complexity:
federation/query-graphs-js/src/graphPath.ts
Line 2167 in 92a9dff
It fails when trying to construct an array of length 2^70. Given the comment above
flatCartesianProduct
, it seems that this is a known issue.The text was updated successfully, but these errors were encountered: