You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a really big query in our application which is orchestrated by many (mostly the same) fragments. When parsing to a DocumentNode, the parser inlines all does fragments (Without checking for duplicates) into one big string (2-2.5MB - 180k Lines). Some fragments are up to 1.600 times references, which is taking up alot of memory in the JS Heap.
I think a solution would be to move all Subfragments to the query declaration but since we also use these fragments to access the cache (using apollo-client), we still need those fragments to be working standalone.
The fragments are already parsed DocumentNodes so also parsing them again and again should be pretty imperformant. My suggestion would be to add the possibility to pass already parsed definitions to the parser/to the Source-Construct, which then can be used instead of creating them again.