Skip to content
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

Move apollo-engine-reporting signatures into apollo-graphql. #2259

Merged
merged 11 commits into from
Feb 4, 2019

Commits on Feb 1, 2019

  1. Setup the foundation for a new apollo-graphql utility library.

    As of this commit, this package provides nothing!
    abernix committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    e55f231 View commit details
    Browse the repository at this point in the history
  2. Publish

    abernix committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    6092e99 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a3ac9b View commit details
    Browse the repository at this point in the history
  4. Move apollo-engine-reporting signature calculations to new `apollo-…

    …graphql`.
    
    Many of these signature calculation functions are now utilized in tools or
    helpers which are not directly related to `apollo-server` functionality,
    including various aspects of the `apollo` CLI which live within
    `apollo-tooling`.
    
    Currently, because of `apollo`'s dependency on `apollo-engine-reporting` for
    this signature, this requires bringing in the entire dependency tree which
    `apollo-server-core` relies on since `apollo-engine-reporting` depends on
    `apollo-server-core`.
    
    By moving this into this new `apollo-graphql` utility library, we're able to
    trim that rather hefty dependency tree and drastically reduce the download
    for running, say, `npx apollo`.
    abernix committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    e565226 View commit details
    Browse the repository at this point in the history
  5. Move Engine signature AST traversals/transforms into ./transforms m…

    …odule.
    
    These AST visitors and transformations are more generally usable for other
    purposes rather than just the Apollo Engine signature reporting and would
    seem to belong in a module of their own.
    abernix committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    96de2d7 View commit details
    Browse the repository at this point in the history
  6. Use lodash.sortby modularly, rather than all of lodash.

    Currently, the only place that we use `lodash` in the entire `apollo-server`
    repository is to utilize the `sortBy` function in this signature generation.
    
    Looking at the bundle stats, it appears that lodash represents 7.1% of the
    `apollo-server` package.  We're a server, so bundle size is generally less
    of a concern, but it's still not to be ignored, particularly as we move into
    worker environments.  More pressingly though, since this package will be
    utilized by the `apollo` CLI, we'll be shaving precious download time off
    the invocation of `npx apollo` if we can get this down.
    
    By switching to the modular package (but still depending on `@types/lodash`
    for _just_ the `ListIteratee` type — which we only need in development — we
    should be able to trim 55.4kB minified (19.1kB minified+gzip'd) off the
    `apollo-server` build.
    
    cc @trevor-scheer @jbaxleyiii @martijnwalraven
    abernix committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    21c2748 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9eca821 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b3758d8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d4a5cad View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    59d5a50 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e84aca2 View commit details
    Browse the repository at this point in the history