Commit graph

2661 commits

Author SHA1 Message Date
Jesse Rosenberger
5497fb2775
Merge branch 'abernix/prepare-2-2-6' 2018-12-04 13:37:04 +02:00
Jesse Rosenberger
1e5cdc6397
Publish
- apollo-server-azure-functions@2.2.6
 - apollo-server-cloud-functions@2.2.6
 - apollo-server-cloudflare@2.2.6
 - apollo-server-core@2.2.6
 - apollo-server-express@2.2.6
 - apollo-server-hapi@2.2.6
 - apollo-server-integration-testsuite@2.2.6
 - apollo-server-koa@2.2.6
 - apollo-server-lambda@2.2.6
 - apollo-server-micro@2.2.6
 - apollo-server-plugin-base@0.1.6
 - apollo-server-testing@2.2.6
 - apollo-server@2.2.6
 - graphql-extensions@0.3.6
2018-12-04 13:35:23 +02:00
Jesse Rosenberger
7468f4ff8a
Prepare CHANGELOG.md for v2.2.6. 2018-12-04 12:10:02 +02:00
Evans Hauser
38bf09b316 (engine-reporting) Include encodedTraces only once. (#2040)
* AER: Remove encodedTraces to prevent duplicates

When there are multiple instances of apollo-engine-reporting, the
`Trace.encode` method gets wrapped each time to add the
`encodedTraces`. In order to prevent them from being added to the
protobuf multiple times, we remove the encodedTraces after adding them
once

* Add changelog

* Move incremental Trace encoding to a-e-r-protobuf

To enable incrmental compilation of traces, we add a patch to the
Trace.encode method generated by protobujs to accept and store encoded
traces. Occassionally with multiple instances of apollo-engine-reporting
that share the same version of the protobuf, the wrapper method gets
applied more than once. In order to ensure that the wrapper only gets
applied once, we patch the Trace.encode method inside of
apollo-engine-protobuf.

tsc hangs on the processing the generated protobuf.js files, so the
tsconfig.json ignores the generated protobuf file. In order for the
typescript index.ts file to compile the generated protobuf.js file is
output to the src folder. To ensure the protobuf files are available to
the production build, `npm run compile` copies the protobuf file
manually from src to dist.

* Reexport protobuf import after modification

`export * from './protobuf'` exports the unmodified reference

* Update comment on Trace.encode to point at a-e-r-p

The override now occurs inside of apollo-engine-reporting-protobuf due
to the case of having multiple reporting challenges, so we need to
update the comments to help indicate that

* Remove typescript build step

In order to simplify the generation of this library, we move the change
the index.ts file into index.js and remove the typescript build step.
Since the type safety is created by the protobufjs generation, this
seems acceptable. In general this portion of the code should remain
relatively stable, so generating and copying the code with `prepare`
remains reasonable.
2018-12-04 12:06:08 +02:00
renovate[bot]
7d06263380
chore(deps): update dependency @types/node to v10.12.12 (#2061) 2018-12-04 07:26:19 +00:00
Jesse Rosenberger
fe2d5972c0
Update ApolloServer.ts 2018-12-03 14:08:40 +02:00
Jesse Rosenberger
363472c87f
Update migration-file-uploads.md 2018-12-03 14:01:28 +02:00
Jesse Rosenberger
8a58e9f4ce
Update CHANGELOG.md 2018-12-03 14:01:15 +02:00
renovate[bot]
ae69675aaa
chore(deps): update dependency @types/node to v10.12.11 (#2057) 2018-12-01 05:53:13 +00:00
Jesse Rosenberger
705256e879
(tests): Re-enable file upload tests for Node.js 10. 🎉🎉🎉
This commit again looks quite complicated, but's merely an over-complication
inflicted by Prettification.  Disabling whitespace differences when viewing
this commit, the functional change here is that we no longer skip many file
upload tests when the (semver) major segment of `process.version` is `10`.

I couldn't be happier to get rid of this exception for file upload tests on
Node.js 10, which was an unfortunate reality of the non-updated
`graphql-upload` module world we previously lived in.

Thanks, @jaydenseric, for the newfound (to us!) Node.js upload support!
2018-11-30 19:41:30 +02:00
Jesse Rosenberger
cd6e575bb7
(tests) Skip file upload tests for NODE_MAJOR_VERSION === 6.
This commit looks way more complicated than it really is thanks to Prettier
trying to be helpful.

All I've done is add `NODE_MAJOR_VERSION === 6` as a version NOT to test
uploads for, in an effort to fix the failing tests (failing appropriately
since Node.js 6 with file uploads throws an error right now and cannot run
uploads anymore.).
2018-11-30 19:04:51 +02:00
Jesse Rosenberger
6dc132e0c6
(tests) Switch to a very explicit Node.js 10 restriction.
I hope to actually remove this limitation, but I'm going to iterate on it
first.  This also just switches to a `NODE_MAJOR_VERSION` constant from the
`apollo-server-integration-testsuite` rather than using the GTE function on
the same input since...math.
2018-11-30 19:00:55 +02:00
Jamie Hodge
bcabbb7785 set content type to text/html for playground (#2026)
BUGFIX: the playground page is currently being served without a content type

<!--
  Thanks for filing a pull request on GraphQL Server!

  Please look at the following checklist to ensure that your PR
  can be accepted quickly:
-->

TODO:

* [x] Update CHANGELOG.md with your change (include reference to issue & this PR)
* [ ] Make sure all of the significant new logic is covered by tests
* [x] Rebase your changes on master so that they can be merged easily
* [x] Make sure all tests and linter rules pass
2018-11-30 18:58:42 +02:00
Jesse Rosenberger
2fd56f0c3e
Don't enable uploads when using an unsupported Node.js in tests.
Now that there are specific versions of Node.js which don't support file
uploads (namely, <= 8.5.0) we need to explicitly disable uploads on those
versions, similar to how those users must opt-in to that behavior by setting
`uploads: false` in their Apollo Server constructor options.

This effectively accomplishes exactly that, but only when necessary.
2018-11-30 18:50:23 +02:00
Ben Iofel
d744c227ac remove .DS_Store (#2055) 2018-11-30 18:43:01 +02:00
Jesse Rosenberger
7e6d6cf13b
Update to graphql-upload@8.0.2. 2018-11-30 18:07:42 +02:00
Jesse Rosenberger
9c563fae50
Throw error at startup when file uploads are enabled on Node.js < 8.5.0.
Due to changes in the third-party `graphql-upload` package which Apollo
Server utilizes to implement out-of-the-box file upload functionality, we
must drop support for file uploads in versions of the Node.js engine prior
to v8.5.0.  Since file uploads are supported by default in Apollo Server 2.x,
and there is an explicit dependency on `graphql-upload`, we must
prevent users who are affected by this mid-major-release deprecation by
being surprised by the sudden lack of upload support.

By `throw`-ing an error at server startup for affected users, we certainly
are breaking a semantic versioning agreement for these users, however with a
relatively simple ergonomic (setting `uploads: false`) we allow those users
who are NOT utilizing file uploads (as we believe is the case with a
majority) to continue using their version of Node.js until it reaches the
end of its supported lifetime (as dictated by its Long Term Support
agreement with the Node.js Foundation).  If we did not `throw` the error at
server start-up, those affected may not notice since they may update and start
their updated server without noticing the impending chance of failure when
someone tries updating!

Apollo Server 2.x has attempted to maintain full compatibility with versions
of Node.js which are still under Long Term Support agreements with the
Node.js Foundation.  While this continues to mostly be true, file uploads
are an exception which we've now had to make.

Third-party open-source projects must absolutely do what's best for their
project.  From an architecture standpoint, I suspect that we (the designers
behind Apollo Server) are mostly to blame for this.  Namely, it's unfortunate
that we had made such an incredibly coupled integration with a third-party
package that we restricted our users from incrementally adopting the
changes (and new/improved functionality) of, in this particular case,
the `graphql-upload` package.  I hope we can take better care with decisions
like this in the future!

Lastly, this commit also adds documentation to help those affected.
2018-11-30 15:59:57 +02:00
Leonardo Gatica
0c2fbc3dec
feat(uploads): replace apollo-upload-server v5 with graphql-upload v8 2018-11-30 15:45:01 +02:00
renovate[bot]
ddabd659d9
chore(deps): update dependency typescript to v3.2.1 (#2050) 2018-11-30 08:00:07 +00:00
renovate[bot]
c269fc2d48
chore(deps): update dependency lerna to v3.5.1 (#2048) 2018-11-30 07:56:03 +00:00
renovate[bot]
402e2bae61
chore(deps): update dependency prettier to v1.15.3 (#2049) 2018-11-30 07:52:25 +00:00
renovate[bot]
e7cc89f503 chore(deps): update dependency @types/hapi to v17.8.0 (#2047)
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| @&#8203;types/hapi | devDependencies | minor | `17.6.4` -> `17.8.0` | [source](https://renovatebot.com/gh/DefinitelyTyped/DefinitelyTyped) |

---

### Renovate configuration

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

🚦 **Automerge**: Enabled.

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

🔕 **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).
2018-11-30 09:46:54 +02:00
Henrik Kok Jørgensen
4610295293 Remove invalid HTTP method from apollo-server-micro example (#2045)
* Remove invalid HTTP method from example

* Update CHANGELOG.md
2018-11-29 17:23:19 +02:00
Jesse Rosenberger
85e9094f6c
Publish
- apollo-server-azure-functions@2.2.5
 - apollo-server-cloud-functions@2.2.5
 - apollo-server-cloudflare@2.2.5
 - apollo-server-core@2.2.5
 - apollo-server-express@2.2.5
 - apollo-server-hapi@2.2.5
 - apollo-server-integration-testsuite@2.2.5
 - apollo-server-koa@2.2.5
 - apollo-server-lambda@2.2.5
 - apollo-server-micro@2.2.5
 - apollo-server-plugin-base@0.1.5
 - apollo-server-testing@2.2.5
 - apollo-server@2.2.5
 - graphql-extensions@0.3.5
2018-11-29 13:45:34 +02:00
Jesse Rosenberger
f67f64fc0e
Update CHANGELOG.md in preparation for v2.2.5 release. 2018-11-29 13:43:55 +02:00
Jesse Rosenberger
3fb539cdbe
Update graphql-playground-react CDN version to v1.7.10.
Follow-up on the update to `graphql-playground-html` in previous release by
also bumping the minor version of the `graphql-playground-react` dependency
to `1.7.10` — which is the version requested from the from the CDN bundle by
`graphql-playground-html`.

Ref: https://github.com/apollographql/apollo-server/pull/2037
2018-11-29 13:43:22 +02:00
renovate[bot]
811e44eee7
chore(deps): update dependency @types/jest to v23.3.10 (#2041) 2018-11-29 10:51:01 +00:00
Pratik Nikam
54c56bfc64 Fix hyperlink for masking and logging errors. (#2032) 2018-11-29 09:08:34 +02:00
renovate[bot]
c6df148893
chore(deps): update dependency chexo to v1.0.7 (#2039) 2018-11-28 23:55:06 +00:00
Jesse Rosenberger
ee44bdb716
Publish
- apollo-server-azure-functions@2.2.4
 - apollo-server-cloud-functions@2.2.4
 - apollo-server-cloudflare@2.2.4
 - apollo-server-core@2.2.4
 - apollo-server-express@2.2.4
 - apollo-server-hapi@2.2.4
 - apollo-server-integration-testsuite@2.2.4
 - apollo-server-koa@2.2.4
 - apollo-server-lambda@2.2.4
 - apollo-server-micro@2.2.4
 - apollo-server-plugin-base@0.1.4
 - apollo-server-testing@2.2.4
 - apollo-server@2.2.4
 - graphql-extensions@0.3.4
2018-11-28 15:20:49 +02:00
Hugh Willson
825d448765 Set GH CODEOWNERS and update the README (#2034)
Clearly identify repo maintainers.
2018-11-28 15:18:48 +02:00
Jesse Rosenberger
2695cb1bdf
Add CHANGELOG.md header for v2.2.4 prior to publishing. 2018-11-28 15:17:44 +02:00
Jesse Rosenberger
fedc96d239
Update @apollographql/graphql-playground-html to latest version. (#2037)
With any luck, we will no longer necessitate our fork which removed the
`graphql-config` dependency thanks to the work done in:

https://github.com/prisma/graphql-playground/pull/874

🎉

Most notably though, this fixes a documentation scrolling problem with
Safari.
2018-11-28 15:15:53 +02:00
renovate[bot]
74326bf01d
chore(deps): update dependency lerna to v3.5.0 (#2036) 2018-11-28 12:54:06 +00:00
Jesse Rosenberger
edd8eaaafe
Update CHANGELOG for v2.2.3. 2018-11-26 20:59:52 +02:00
Jesse Rosenberger
1f3801c949
Publish
- apollo-cache-control@0.3.3
 - apollo-datasource-rest@0.2.1
 - apollo-datasource@0.2.1
 - apollo-engine-reporting@0.1.3
 - apollo-server-azure-functions@2.2.3
 - apollo-server-cache-memcached@0.2.1
 - apollo-server-cache-redis@0.2.1
 - apollo-server-caching@0.2.1
 - apollo-server-cloud-functions@2.2.3
 - apollo-server-cloudflare@2.2.3
 - apollo-server-core@2.2.3
 - apollo-server-express@2.2.3
 - apollo-server-hapi@2.2.3
 - apollo-server-integration-testsuite@2.2.3
 - apollo-server-koa@2.2.3
 - apollo-server-lambda@2.2.3
 - apollo-server-micro@2.2.3
 - apollo-server-plugin-base@0.1.3
 - apollo-server-testing@2.2.3
 - apollo-server@2.2.3
 - apollo-tracing@0.3.3
 - graphql-extensions@0.3.3
2018-11-26 20:43:29 +02:00
renovate[bot]
aee49dfd98
chore(deps): update dependency ts-jest to v23.10.5 (#2016) 2018-11-23 08:07:32 +00:00
renovate[bot]
a922a56160
chore(deps): update dependency hapi to v17.8.1 (#2017) 2018-11-23 07:10:30 +00:00
renovate[bot]
27753575a9
chore(deps): update dependency redis-mock to v0.40.0 (#2015) 2018-11-23 06:03:42 +00:00
renovate[bot]
6563e50188
chore(deps): update dependency apollo-link-http to v1.5.7 (#2014) 2018-11-23 04:22:48 +00:00
Jesse Rosenberger
492fcf94e6
Update README.md 2018-11-22 16:18:03 +02:00
Jesse Rosenberger
58cb6511d7
docs: Update migration guide to playground, not gui.
Fixes #1717
2018-11-22 16:15:18 +02:00
renovate[bot]
6f6f1d020f chore(deps): update dependency lru-cache to v5 (#2004)
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| lru-cache | dependencies | major | `^4.1.3` -> `^5.0.0` | [source](https://renovatebot.com/gh/isaacs/node-lru-cache) |

---

### Release Notes

<details>
<summary>isaacs/node-lru-cache</summary>

### [`v5.1.1`](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.1.0...v5.1.1)

[Compare Source](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.1.0...v5.1.1)

### [`v5.1.0`](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.0.1...v5.1.0)

[Compare Source](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.0.1...v5.1.0)

### [`v5.0.1`](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.0.0...v5.0.1)

[Compare Source](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v5.0.0...v5.0.1)

### [`v5.0.0`](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v4.1.4...v5.0.0)

[Compare Source](https://renovatebot.com/gh/isaacs/node-lru-cache/compare/v4.1.4...v5.0.0)

</details>

---

### Renovate configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

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

🔕 **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).
2018-11-22 15:34:59 +02:00
renovate[bot]
c1ac869135
chore(deps): update dependency @types/node to v10.12.10 (#2012) 2018-11-22 11:13:37 +00:00
renovate[bot]
0b58911df3 chore(deps): update dependency lint-staged to v8 (#1986)
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| lint-staged | devDependencies | major | `7.3.0` -> `8.1.0` | [source](https://renovatebot.com/gh/okonet/lint-staged) |

---

### Release Notes

<details>
<summary>okonet/lint-staged</summary>

### [`v8.1.0`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.1.0)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.5...v8.1.0)

### [8.1.0](http://git+https/github.com/okonet/lint-staged/compare/v8.0.5...v8.1.0) (2018-11-21)

##### Features

-   Add `relative` option to allow passing relative paths to linters ([#&#8203;534](http://git+https/github.com/okonet/lint-staged/issues/534)) ([fcb774b](http://git+https/github.com/okonet/lint-staged/commit/fcb774b))

### [`v8.0.5`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.5)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.4...v8.0.5)

#### [8.0.5](http://git+https/github.com/okonet/lint-staged/compare/v8.0.4...v8.0.5) (2018-11-17)

##### Bug Fixes

-   Use listr-update-renderer from npm ([#&#8203;542](http://git+https/github.com/okonet/lint-staged/issues/542)) ([503110d](http://git+https/github.com/okonet/lint-staged/commit/503110d)), closes [#&#8203;533](http://git+https/github.com/okonet/lint-staged/issues/533)

### [`v8.0.4`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.4)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.3...v8.0.4)

#### [8.0.4](http://git+https/github.com/okonet/lint-staged/compare/v8.0.3...v8.0.4) (2018-10-31)

##### Bug Fixes

-   **package:** update staged-git-files to version 1.1.2 ([ce434d3](http://git+https/github.com/okonet/lint-staged/commit/ce434d3))

### [`v8.0.3`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.3)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.2...v8.0.3)

#### [8.0.3](http://git+https/github.com/okonet/lint-staged/compare/v8.0.2...v8.0.3) (2018-10-30)

##### Bug Fixes

-   Allow to use lint-staged on CI ([#&#8203;523](http://git+https/github.com/okonet/lint-staged/issues/523)) ([225a904](http://git+https/github.com/okonet/lint-staged/commit/225a904))

### [`v8.0.2`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.2)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.1...v8.0.2)

#### [8.0.2](http://git+https/github.com/okonet/lint-staged/compare/v8.0.1...v8.0.2) (2018-10-29)

##### Bug Fixes

-   **git:** Use resolveGitDir in hasPartiallyStagedFiles ([#&#8203;520](http://git+https/github.com/okonet/lint-staged/issues/520)) ([af99172](http://git+https/github.com/okonet/lint-staged/commit/af99172)), closes [#&#8203;514](http://git+https/github.com/okonet/lint-staged/issues/514)

### [`v8.0.1`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.1)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v8.0.0...v8.0.1)

#### [8.0.1](http://git+https/github.com/okonet/lint-staged/compare/v8.0.0...v8.0.1) (2018-10-29)

##### Bug Fixes

-   **git:** Use resolveGitDir to resolve to .git for git commands ([#&#8203;518](http://git+https/github.com/okonet/lint-staged/issues/518)) ([da42f8a](http://git+https/github.com/okonet/lint-staged/commit/da42f8a)), closes [#&#8203;514](http://git+https/github.com/okonet/lint-staged/issues/514)

### [`v8.0.0`](https://renovatebot.com/gh/okonet/lint-staged/releases/v8.0.0)

[Compare Source](https://renovatebot.com/gh/okonet/lint-staged/compare/v7.3.0...v8.0.0)

### [8.0.0](http://git+https/github.com/okonet/lint-staged/compare/v7.3.0...v8.0.0) (2018-10-29)

##### Features

-   Add support for partially staged files ([#&#8203;75](http://git+https/github.com/okonet/lint-staged/issues/75)) ([f82443c](http://git+https/github.com/okonet/lint-staged/commit/f82443c)), closes [#&#8203;62](http://git+https/github.com/okonet/lint-staged/issues/62)

##### BREAKING CHANGES

-   Node >= 8.6 is required

</details>

---

### Renovate configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

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

🔕 **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).
2018-11-22 13:07:10 +02:00
Jesse Rosenberger
93489b7941
fix: Mandate assertion count in test which could otherwise false-positive. (#1983)
This was something I just happened to spot, though further investigation is
likely necessary to determine if other similar cases can be discovered.

This fixes this test to `expect` the number of additional `expectations we
have expressed for it: 2.

Testing errors in `catch`es of `Promise` chains necessitates the use of
`expect.assertions(n)` where `n` is the number of assertions declared in
that particular test.

Without this `expect`ation clearly defined, a resolved `Promise` will not
result in the assertion being tested.  For example, if the `query` passed to
this test was a query against a type in the schema (i.e. `query: 'foo'` was
replaced with `query: { query: '{ testString }' }`) the desired error would
not be produced, but the test would still pass.  I'm not saying that's
likely, but there's certainly the possibility that (given fault code)
something else in the plumbing could cause that Promise to resolve.

Ref: https://jestjs.io/docs/en/tutorial-async#error-handling
2018-11-22 13:02:51 +02:00
Jesse Rosenberger
87ff25b2df
Instantiate lru-cache class using new in InMemoryLRUCache. (#2007)
This is mandated by `lru-cache` v5 and surfaced the CircleCI failures on #2004:

https://circleci.com/gh/apollographql/apollo-server/22537

Luckily, this is a private implementation detail of Apollo Server's
`InMemoryLRUCache` so no additional changes should be necessary and we should
be able to update to `lru-cache` 5.0.0 in a semver minor respectful way.
2018-11-22 12:58:19 +02:00
renovate[bot]
9beef0c43b
chore(deps): update dependency @types/hapi to v17.6.4 (#2011) 2018-11-22 09:10:58 +00:00
renovate[bot]
b25b602d14
chore(deps): update dependency husky to v1.2.0 (#2003) 2018-11-22 03:11:41 +00:00
renovate[bot]
199ba1e5ac
chore(deps): update dependency fibers to v3.1.1 (#1999) 2018-11-21 23:36:51 +00:00