graphql-normalizr
graphql-normalizr copied to clipboard
Separating 'addRequiredFields' and 'parse' functions for smaller bundles
Hi there,
Great job on creating this library, we love it.
I'm submitting a PR that exports addRequiredFields
and parse
functions separately.
We are using only the normalize
function from your library and not the addRequiredFields
and parse
, but since they are both returned by GraphQLNormalizr
constructor, webpack includes those 2 functions as well, along with graphql
dependencies, resulting in a large bundle size and unused dead code.
We are using Webpack with Terser for minifying and after after splitting the above mentioned functions, we saved around 9kb gzipped and 36kb parsed on bundle size.
We also updated the documentation and the tests!
Can we merge it?