Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update README

+11 -14
+11 -14
README.md
··· 31 31 parser, printer, and visitor, which only support the GraphQL query language and 32 32 are tested to 100% coverage and built to match GraphQL.js’ performance. 33 33 34 + In an average app using the GraphQL library for a GraphQL client aliasing this 35 + package could save you 7kB gzip effortlessly. 36 + 37 + > **Note:** If you’re using `@urql/core@^4` you’re already benefitting from 38 + > `@0no-co/graphql.web`’s size reduction and aliasing `graphql-web-lite` will 39 + > only benefit you if you import from `graphql` in any of your other code or 40 + > libraries. 41 + 34 42 ## Installation 35 43 36 44 `graphql-web-lite` mirrors the folder structure of the regular `graphql` package and ··· 288 296 ### Bundlesize Impact 289 297 290 298 Most GraphQL client-side libraries use the following common set of imports from the `graphql` library. 291 - Assuming a transformation like [`babel-plugin-modular-graphql`](https://github.com/kitten/babel-plugin-modular-graphql/) 292 - or granular imports in general this creates a short list of utilities. 293 299 294 300 ```js 295 - export { valueFromASTUntyped } from 'graphql/utilities/valueFromASTUntyped.mjs'; 296 - export { GraphQLError } from 'graphql/error/GraphQLError.mjs'; 297 - export { Kind } from 'graphql/language/kinds.mjs'; 298 - export { parse } from 'graphql/language/parser.mjs'; 299 - export { print } from 'graphql/language/printer.mjs'; 300 - export { visit } from 'graphql/language/visitor.mjs'; 301 + export { BREAK, isSelectionNode, parse, print, GraphQLError, Kind, visit } from 'graphql'; 301 302 ``` 302 303 303 - The minzipped size of the imports is about `11.2kB` in a given output bundle, which assumes all the above imports are 304 - in use. When the GraphQL language parser is dropped from the bundle, for instance by precompiling queries and excluding 305 - it in a compilation step, the resulting minzipped size drops to `5.55kB`. 306 - 307 - When `graphql-web-lite` replaces the `graphql` package the minzipped size drops from the `11.2kB` figure down to `5.44kB`, 308 - and `3.19kB` without the parser. 304 + The minzipped size of the imports is about `10kB` in a given output bundle, which assumes all the above imports are 305 + in use. When `graphql-web-lite` replaces the `graphql` package the minzipped size drops to about `3kB`.