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

Add support for lambda to upload file #1

Merged
merged 355 commits into from
Feb 14, 2019

Conversation

livingmine
Copy link

TODO:

  • Update CHANGELOG.md with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

Hi @charleswong28 , i'm continuing your work based on this comment to support for lambda to upload file. Essentially, i've done the following to the best of my knowledge:

  1. Rebase to current master
  2. Guard against the possibility of processFileUploads being undefined
  3. Modify the pattern to use createHandler implementation to make sure it shares as many common patterns as possible

I'm trying not to create a new PR in apollographql's apollo-server repo to preserve the discussions already made in your PR.

Prosper Otemuyiwa and others added 30 commits November 13, 2018 12:09
…hql#1956)

* Add File uploads as a feature

* Add authentication to server as access-control
lolwut

Revert "lolwut"

This reverts commit 03a2e10.
…lient-info-default-to-headers

AER/Default to headers for client identity
…#1961)

This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| @​types/node | devDependencies | patch | `10.12.6` -> `10.12.7` | [source](https://renovatebot.com/gh/DefinitelyTyped/DefinitelyTyped) |

---

### Renovate configuration

:date: **Schedule**: "after 6pm every weekday,before 8am every weekday" in timezone America/Los_Angeles.

:vertical_traffic_light: **Automerge**: Enabled.

:recycle: **Rebasing**: Whenever PR is stale, or if you modify the PR title to begin with "`rebase!`".

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

This PR has been generated by [Renovate Bot](https://renovatebot.com/gh/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#apollographql/apollo-server).
To support having a source `_redirects` file on disk, in addition to
supporting the generated version redirects.
…anup

Move relevant best practices guides into server docs
…graphql#1980)

This updates the `renovate.json` to remove a version pinning of `lint-staged` which clearly didn't work since the current version of `lint-staged` is newer than `v7`.
…graphql#1981)

This updates `renovate.json` to use a shared, base configuration rather than repeating the same defaults across multiple repositories.

That base configuration lives at https://github.com/apollographql/renovate-config-apollo-open-source and is published to npm as `renovate-config-apollo-open-source` (https://npm.im/renovate-config-apollo-open-source).  It is referenced here by its short name `apollo-open-source`.

For more information on sharable Renovate config presets, see https://renovatebot.com/docs/config-presets/.
Due to a number of other assignments within `createPlaygroundOptions`, the default is still maintained and the `playground` configuration parameter should be entirely optional.
abernix and others added 27 commits February 1, 2019 16:34
As of this commit, this package provides nothing!
…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`.
…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.
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
…ne-signatures-to-apollo-graphql

Move `apollo-engine-reporting` signatures into `apollo-graphql`.
*Before*: allows the addition custom
*After*: allows the addition of custom
@charleswong28 charleswong28 merged commit bf8b1ad into charleswong28:master Feb 14, 2019
@charleswong28
Copy link
Owner

Hi @livingmine
Thanks for the PR! It looks much better to use fileUploadProcess in ApolloServer.ts instead of lambdaApollo.ts.

We've used this in our project and it works as expected. Thanks @livingmine !

@livingmine
Copy link
Author

@charleswong28 My pleasure! Let's wait for the feedback from apollo-server's maintainer, hopefully it can be merged soon to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.