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
refactor(stitchingInfo): shift more calculation to build time #3199
Conversation
-- run collectFields on selectionSet hints at build time -- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a set
|
The latest changes of this PR are not available as alpha, since there are no linked |
-- run collectFields on selectionSet hints at build time -- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a Set
-- run collectFields on selectionSet hints at build time -- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a Set
No need for deepMerge use createDefaultExecutor Few improvements workflow_dispatch Not only master refactor(stitchingInfo): shift more calculation to build time (#3199) -- run collectFields on selectionSet hints at build time -- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a Set Use collectFields and ExecutionContext from graphql-js (#3200) refactor: use Set to avoid repetition (#3202) * use Set to deduplicate * further refactor refactor ExpandAbstractTypes as PrepareGatewayRequest will consolidate remaining pre-user supplied transforms into this transform to hopefully reduce repetition also adds memoization of schema metadata small refactors add visitorKeys argument small refactor import WrapConcreteFields into PrepareGatewayRequest this does not use the same visitors and does not visit beneath fields, so can just be inlined info should be optional in DelegationContext fix types Consolidate VisitSelectionSets rename var internalize PrepareGatewayDocument as transform as prepareGatewayDocument function move varName generator out of loop to prevent recurrent looping refactor AddArgumentsAsVariables rename AddArgumentsAsVariables to FinalizeGatewayRequest to consolidate post custom transforms arguments should be added to target final targetSchema not transformedSchema move FilterToSchema tests to delegate package starting refacotr of FilterToSchema add visitorArgs also -- unfortunately -- requires another visit pass to properly remove variables if an object or interface field does not have selections -- another approach could be to keep track of variable uses, and subtract at the end of the first pass integrate FilterToSchema into FinalizeGatewayRequest fold AddTypenameToAbstract into FinalizeGatewayRequest extract finalizeGatewayRequest function from the transform retire all delegation transforms fix build typo Experiment LRU Cache More promise LRU with Refactor Fix TS Build Try Print instead More cache Use JSON.stringify? Fix caching
* Experiment LRU Cache No need for deepMerge use createDefaultExecutor Few improvements workflow_dispatch Not only master refactor(stitchingInfo): shift more calculation to build time (#3199) -- run collectFields on selectionSet hints at build time -- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a Set Use collectFields and ExecutionContext from graphql-js (#3200) refactor: use Set to avoid repetition (#3202) * use Set to deduplicate * further refactor refactor ExpandAbstractTypes as PrepareGatewayRequest will consolidate remaining pre-user supplied transforms into this transform to hopefully reduce repetition also adds memoization of schema metadata small refactors add visitorKeys argument small refactor import WrapConcreteFields into PrepareGatewayRequest this does not use the same visitors and does not visit beneath fields, so can just be inlined info should be optional in DelegationContext fix types Consolidate VisitSelectionSets rename var internalize PrepareGatewayDocument as transform as prepareGatewayDocument function move varName generator out of loop to prevent recurrent looping refactor AddArgumentsAsVariables rename AddArgumentsAsVariables to FinalizeGatewayRequest to consolidate post custom transforms arguments should be added to target final targetSchema not transformedSchema move FilterToSchema tests to delegate package starting refacotr of FilterToSchema add visitorArgs also -- unfortunately -- requires another visit pass to properly remove variables if an object or interface field does not have selections -- another approach could be to keep track of variable uses, and subtract at the end of the first pass integrate FilterToSchema into FinalizeGatewayRequest fold AddTypenameToAbstract into FinalizeGatewayRequest extract finalizeGatewayRequest function from the transform retire all delegation transforms fix build typo Experiment LRU Cache More promise LRU with Refactor Fix TS Build Try Print instead More cache Use JSON.stringify? Fix caching * Fix mergeExtensions * Fix benchmark * More * Fix tests * Remove schemaTransforms * More fixes * Fix * More improvements * More improvements * More fixes? * Refactor w/o caching * Try sth * Reduce number of iterations * Reduce number of iterations * Small * Fix build * Cleanup * Add changeset * Fix build * Fix tests
-- run collectFields on selectionSet hints at build time
-- use a fieldNode cache at build time so that at run time we can collect unique fieldNodes simply by using a Set (rather than by printing nodes and using a Map)