This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce size impact of populateExchange (#122)
* Reuse more helpers and add mutations where necessary in populateExchange Refactor some parts to avoid unnecessary immutability for micro-perf optimisations, and reduce size where possible by reusing helpers and swapping out immutability for mutability. Total minzipped size: 8.24kB -> 8.19kB * Remove usage of Array.from This isn't supported in IE11 and hence breaks compatibility if it isn't user polyfilled. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from * Remove another internal immutable change in addTypenamesToQuery * Extract unwrapType helper and enhance type-safety * Remove userFragments/typeFragments reduce Removes additional closures that aren't needed. Addresses PR comments * Remove additional map for for-loop * Use Kind enum from graphql * Refactor extractSelectionsFromQuery and addFragmentsToQuery * Add IntrospectionQuery type from populate to cache * Simplify GraphQLFlatType * Moving map.ts to src/helpers/
- Loading branch information
Showing
7 changed files
with
153 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.