Commit graph

2611 commits

Author SHA1 Message Date
Jesse Rosenberger
21c4c11a18
Merge remote-tracking branch 'public/master' into release-2.4.0 2019-02-01 14:00:59 +02:00
renovate[bot]
7dc854935d
chore(deps): update dependency @types/node to v10.12.21 (#2256) 2019-02-01 07:17:13 +00:00
renovate[bot]
76862f67e4
chore(deps): update dependency typescript to v3.3.1 (#2255) 2019-02-01 05:17:56 +00:00
renovate[bot]
455c7ebc86
chore(deps): update dependency hapi to v17.8.3 (#2254) 2019-02-01 04:15:35 +00:00
Jesse Rosenberger
8d9d7fea12
Publish
- apollo-engine-reporting@0.2.2
 - apollo-server-core@2.3.4
2019-01-31 19:03:17 +02:00
Trevor Scheer
b64895ddec
Add apollo-server-core to deps in apollo-engine-reporting (#2248)
* Add apollo-server-core to deps in apollo-engine-reporting

* Add reference to requestPipelineAPI
2019-01-31 08:59:36 -08:00
Michael P. Geraci
a0e25cf2bd Fix a typo in the "Custom GraphQLScalarType instance" example (#2247)
This is just a quick fix for a typo that threw me for a loop when testing out this example.
2019-01-31 10:12:47 +02:00
renovate[bot]
c561b02e99
chore(deps): update dependency prettier to v1.16.3 (#2251) 2019-01-31 06:19:07 +00:00
renovate[bot]
671453ef53
chore(deps): update dependency @types/node-fetch to v2.1.5 (#2250) 2019-01-31 04:55:26 +00:00
renovate[bot]
57433c456d
chore(deps): update dependency @types/node to v10.12.20 (#2249) 2019-01-31 04:19:43 +00:00
renovate[bot]
0ba70f97b0
chore(deps): update dependency prettier to v1.16.2 (#2245) 2019-01-30 10:27:42 +00:00
Jesse Rosenberger
03283f9ad3
Merge branch 'master' into release-2.4.0 2019-01-29 12:10:13 +02:00
Jesse Rosenberger
5939327edd
Publish
- apollo-server-azure-functions@2.3.3
 - apollo-server-cloud-functions@2.3.3
 - apollo-server-cloudflare@2.3.3
 - apollo-server-core@2.3.3
 - apollo-server-express@2.3.3
 - apollo-server-hapi@2.3.3
 - apollo-server-integration-testsuite@2.3.3
 - apollo-server-koa@2.3.3
 - apollo-server-lambda@2.3.3
 - apollo-server-micro@2.3.3
 - apollo-server-plugin-base@0.2.3
 - apollo-server-testing@2.3.3
 - apollo-server@2.3.3
 - graphql-extensions@0.4.3
2019-01-29 11:51:30 +02:00
Jesse Rosenberger
3d106039b6
Update CHANGELOG.md in preparation for v2.3.3 release. 2019-01-29 11:39:28 +02:00
Jesse Rosenberger
db39aa5604
Remove willStart from apollo-server, already called via …-express. (#2239)
* Remove `willStart` from `apollo-server`, already called via `...-express`.

When the request pipeline was initially introduced, the integrations
had yet to be updated to call the new life-cycle events.  Now, the
integrations have all caught up, but `apollo-server` is still calling
`willStart`, despite the fact that its dependency which provides the actual
server implementation — `apollo-server-express` – is _also_ calling it,
resulting in double invocation of this event.

I suspect some follow-up work should guard against this possibility, but for
now this should remove the duplication.

* Update CHANGELOG.md for #2239.

Ref: https://github.com/apollographql/apollo-server/pull/2239
2019-01-29 11:39:08 +02:00
Kurt Mackey
cd674aae72 More strict check for node version for graphql-upload (#2235)
Stop traversing the `graphql-upload` module tree in all non-Node.js environments, to support subset-V8 runtimes like Fly.io.
2019-01-29 11:36:40 +02:00
renovate[bot]
25028e3678
chore(deps): update dependency @types/node to v10.12.19 (#2238) 2019-01-29 05:21:43 +00:00
renovate[bot]
78512662eb
chore(deps): update dependency @types/aws-lambda to v8.10.18 (#2237) 2019-01-29 04:21:16 +00:00
renovate[bot]
7a9cdbbd7d
chore(deps): update dependency lint-staged to v8.1.1 (#2236) 2019-01-29 03:19:50 +00:00
renovate[bot]
82674bf129
chore(deps): update dependency koa to v2.7.0 (#2233) 2019-01-28 11:09:34 +00:00
Jesse Rosenberger
02ebad271e
Update package-lock.json to (hopefully) fix optional dependency flapping.
Thanks to npm@6.6.0!
2019-01-25 20:30:27 +02:00
Jesse Rosenberger
dc46e58525
Update low-severity merge (devDependency) to satiate npm audit fix. 2019-01-25 20:26:58 +02:00
Jesse Rosenberger
d48d0972c5
Publish
- apollo-cache-control@0.4.1
 - apollo-datasource-rest@0.2.2
 - apollo-datasource@0.2.2
 - apollo-engine-reporting@0.2.1
 - apollo-server-azure-functions@2.3.2
 - apollo-server-cache-memcached@0.2.2
 - apollo-server-cache-redis@0.2.2
 - apollo-server-caching@0.2.2
 - apollo-server-cloud-functions@2.3.2
 - apollo-server-cloudflare@2.3.2
 - apollo-server-core@2.3.2
 - apollo-server-express@2.3.2
 - apollo-server-hapi@2.3.2
 - apollo-server-integration-testsuite@2.3.2
 - apollo-server-koa@2.3.2
 - apollo-server-lambda@2.3.2
 - apollo-server-micro@2.3.2
 - apollo-server-plugin-base@0.2.2
 - apollo-server-testing@2.3.2
 - apollo-server@2.3.2
 - apollo-tracing@0.4.1
 - graphql-extensions@0.4.2
2019-01-25 18:48:18 +02:00
Jesse Rosenberger
8a9d5cf828
Polish CHANGELOG.md prior to v2.3.2 release. 2019-01-25 18:46:11 +02:00
Jesse Rosenberger
14c93a5ecf
Update apollo-cache-control's CHANGELOG.md in preparation for publishing. 2019-01-25 18:19:43 +02:00
David Glasser
821578775d apollo-cache-control: consider hintless root fields to be uncached (#2210)
This is consistent with the old engineproxy interpretation of cache hints. We
special-case scalar fields to inherit their parent field's hints for
simplicity (so you don't have to hint every scalar field in a hinted object),
but when the parent field is non-root that inherited hint gets defaultMaxAge
applied to it. When the parent field is the root, that inherited hint doesn't
get defaultMaxAge applied because we don't run willResolveField for the root
query.

Includes a CHANGELOG update for #2197.
2019-01-25 18:06:25 +02:00
Jesse Rosenberger
18d9041db7
Don't write to persisted query cache until execution will begin. (#2227)
Since we already write to the persisted query cache asynchronously (and
intentionally do not await the Promise) this won't have any affect on the
current behavior of when the persisted query cache is written to in the
event of an executable request, but if an operation comes in and doesn't
parse or validate, we'll avoid wasting cache space on an operation that will
never execute.

Additionally, in a similar light, if a plugin throws an error which stops
execution, we can avoid the side-effect of writing to the persisted query
cache.

In terms of the APQ behavior, while this could cause additional round-trips
for a client which repeatedly sends an invalid operation, that operation is
never going to successfully finish anyway.  While developer tooling will
help avoid this problem in the first place, this refusal to store an invalid
operation in the APQ cache could actually help diagnose a failure since the
full operation (rather than just the SHA256 of that document) will appear
in the browser's dev-tools on the retry.

If we're looking to spare parsing and validating documents which we know are
going to fail, I think that's going to be a better use of the (new)
`documentStore` cache (#2111), since its in-memory and can accommodate a
more complex data structure which includes the validation errors from the
previous attempt which will, of course, be the same when validating the same
operation against the same schema again.  As the PR that introduced that
feature shows, sparing those additional parses and validations (cached APQ
documents still needs to be parsed and validated, currently) will provide a
more successful performance win overall.

Ref: https://github.com/apollographql/apollo-server/pull/2111
2019-01-25 18:01:15 +02:00
Pete Browne
ba0f4f559f docs: Fix bodyParserConfig in applyMiddleware (#2184) 2019-01-25 16:27:39 +02:00
renovate[bot]
ef4d8c081c
chore(deps): update dependency redis-mock to v0.43.0 (#2226) 2019-01-25 05:25:54 +00:00
renovate[bot]
14ec9aaab9
chore(deps): update dependency graphql-tools to v4.0.4 (#2225) 2019-01-25 04:24:31 +00:00
renovate[bot]
948afd82de
chore(deps): update dependency ws to v6.1.3 (#2221) 2019-01-24 08:49:39 +00:00
renovate[bot]
e0c6a3547e
chore(deps): update dependency yup to v0.26.10 (#2220) 2019-01-24 04:23:02 +00:00
renovate[bot]
681ca4c56d chore(deps): pin dependency @types/fast-json-stable-stringify to 2.0.0 (#2185)
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| @​types/fast-json-stable-stringify | devDependencies | pin | `^2.0.0` -> `2.0.0` | [source](https://togithub.com/DefinitelyTyped/DefinitelyTyped) |

📌 **Important**: Renovate will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset `:preserveSemverRanges` your config if you instead don't wish to pin dependencies.

---

### 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!`".

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/config-help/issues) if that's undesired.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#apollographql/apollo-server).
2019-01-23 22:43:39 +02:00
renovate[bot]
117ea3042b chore(deps): update dependency prettier to v1.16.1 (#2203)
This PR contains the following updates:

| Package | Type | Update | Change | References |
|---|---|---|---|---|
| prettier | devDependencies | minor | `1.15.3` -> `1.16.1` | [homepage](https://prettier.io), [source](https://togithub.com/prettier/prettier) |

---

### Release Notes

<details>
<summary>prettier/prettier</summary>

### [`v1.16.1`](https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;1161)

[Compare Source](https://togithub.com/prettier/prettier/compare/1.16.0...1.16.1)

[diff](https://togithub.com/prettier/prettier/compare/1.16.0...1.16.1)

-   JavaScript: Do not format functions with arguments as react hooks ([#&#8203;5778] by [@&#8203;SimenB])

    The formatting added in Prettier 1.16 would format any function receiving an
    arrow function and an array literal to match React Hook's documentation.
    Prettier will now format this the same as before that change if the arrow
    function receives any arguments.

    <!-- prettier-ignore -->

    ```js
    // Input
    ["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
      (allColors, color) => {
        return allColors.concat(color);
      },
      []
    );

    // Output (Prettier 1.16.0)
    ["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce((
      allColors,
      color
    ) => {
      return allColors.concat(color);
    }, []);

    // Output (Prettier 1.16.1)
    ["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
      (allColors, color) => {
        return allColors.concat(color);
      },
      []
    );
    ```

-   JavaScript: Add necessary parentheses for decorators ([#&#8203;5785] by [@&#8203;ikatyang])

    Parentheses for decorators with nested call expressions are optional for legacy decorators
    but they're required for decorators in the current [proposal](https://tc39.github.io/proposal-decorators/#sec-syntax).

    <!-- prettier-ignore -->

    ```js
    // Input
    class X {
      @&#8203;(computed().volatile())
      prop
    }

    // Output (Prettier 1.16.0)
    class X {
      @&#8203;computed().volatile()
      prop
    }

    // Output (Prettier 1.16.1)
    class X {
      @&#8203;(computed().volatile())
      prop
    }
    ```

-   TypeScript: Stable parentheses for function type in the return type of arrow function ([#&#8203;5790] by [@&#8203;ikatyang])

    There's a regression introduced in 1.16 that
    parentheses for function type in the return type of arrow function were kept adding/removing.
    Their parentheses are always printed now.

    <!-- prettier-ignore -->

    ```ts
    // Input
    const foo = (): (() => void) => (): void => null;
    const bar = (): () => void => (): void => null;

    // First Output (Prettier 1.16.0)
    const foo = (): () => void => (): void => null;
    const bar = (): (() => void) => (): void => null;

    // Second Output (Prettier 1.16.0)
    const foo = (): (() => void) => (): void => null;
    const bar = (): () => void => (): void => null;

    // Output (Prettier 1.16.1)
    const foo = (): (() => void) => (): void => null;
    const bar = (): (() => void) => (): void => null;
    ```

-   MDX: Correctly recognize inline JSX ([#&#8203;5783] by [@&#8203;ikatyang])

    Previously, some inline JSXs are wrongly recognized as block HTML/JSX,
    which causes unexpected behaviors. This issue is now fixed.

    <!-- prettier-ignore -->

    ```md
    <!-- Input -->
    _foo <InlineJSX /> bar_

    <!-- Output (Prettier 1.16.0) -->
    _foo

    <InlineJSX /> bar_

    <!-- Output (Prettier 1.16.1) -->
    _foo <InlineJSX /> bar_
    ```

[@&#8203;ikatyang]: https://togithub.com/ikatyang

[@&#8203;simenb]: https://togithub.com/SimenB

[#&#8203;5778]: https://togithub.com/prettier/prettier/pull/5778

[#&#8203;5783]: https://togithub.com/prettier/prettier/pull/5783

[#&#8203;5785]: https://togithub.com/prettier/prettier/pull/5785

[#&#8203;5790]: https://togithub.com/prettier/prettier/pull/5790

### [`v1.16.0`](https://togithub.com/prettier/prettier/blob/master/CHANGELOG.md#&#8203;1160)

[Compare Source](https://togithub.com/prettier/prettier/compare/1.15.3...1.16.0)

[diff](https://togithub.com/prettier/prettier/compare/1.15.3...1.16.0)

🔗 [Release Notes](https://prettier.io/blog/2019/01/20/1.16.0.html)

</details>

---

### 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.

---

 - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#apollographql/apollo-server).
2019-01-23 17:46:53 +02:00
Jesse Rosenberger
f045a4d0c9
Publish
- apollo-cache-control@0.5.0-alpha.2
 - apollo-datasource-rest@0.3.0-alpha.2
 - apollo-datasource@0.3.0-alpha.2
 - apollo-engine-reporting@0.3.0-alpha.2
 - apollo-server-azure-functions@2.4.0-alpha.3
 - apollo-server-cache-memcached@0.3.0-alpha.2
 - apollo-server-cache-redis@0.3.0-alpha.2
 - apollo-server-caching@0.3.0-alpha.2
 - apollo-server-cloud-functions@2.4.0-alpha.3
 - apollo-server-cloudflare@2.4.0-alpha.3
 - apollo-server-core@2.4.0-alpha.3
 - apollo-server-express@2.4.0-alpha.3
 - apollo-server-fastify@2.4.0-alpha.3
 - apollo-server-hapi@2.4.0-alpha.3
 - apollo-server-integration-testsuite@2.4.0-alpha.3
 - apollo-server-koa@2.4.0-alpha.3
 - apollo-server-lambda@2.4.0-alpha.3
 - apollo-server-micro@2.4.0-alpha.3
 - apollo-server-plugin-base@0.3.0-alpha.3
 - apollo-server-testing@2.4.0-alpha.3
 - apollo-server@2.4.0-alpha.3
 - apollo-tracing@0.5.0-alpha.2
 - graphql-extensions@0.5.0-alpha.3
2019-01-23 15:58:50 +02:00
Jesse Rosenberger
a550dfc549
Bump apollo-server-fastify to match last 2.4.0-alpha.x release.
This will cause the first release of `apollo-server-fastify` to land at
`2.4.0-alpha.3`.  (Hopefully.)
2019-01-23 15:53:59 +02:00
Jesse Rosenberger
e82bccfedf
Fix CHANGELOG.md for #1971, now tentatively in 2.4.x. 2019-01-23 15:48:01 +02:00
Remy
069110b353 feat(Fastify) Apollo server Fastify integration #626 (#1971)
* feat(fastify) Apollo Fastify server integration resolve #626

* feat(fastify) Use createHandler instead of applyMiddleware #626

* feat(fastify) Fix integration test for node 10 #626

* feat(fastify) Update README's with fastify createHandler interface #626

* feat(fastify) Implement the fastify createHandler as a synchronous method #626

* (fastify) Tweaks to re-align with the parallel work in #2054.

* (fastify): Use port 9999 rather than 8888 for tests.  Because Gatsby.

This specific port per integration is pretty brittle to begin with, but it
does work.  Currently, the fact that it works is facilitated by the fact
that most people don't use 5555 (Hapi) and 6666 (Express) for anything.

That said, the ever-popular Gatsby uses 8888 by default, so let's use 9999!

* (fastify) Remove duplicative assertion in upload initialization.

* (fastify) Implement fastify upload middleware

* (fastify) Fix linting issues

* (fastify) Update package-lock
2019-01-23 15:43:47 +02:00
Jesse Rosenberger
7d5468800f
Merge pull request #2111 from apollographql/abernix/cache-parsed-validated
Cache successfully parsed and validated documents for future requests.
2019-01-23 15:09:56 +02:00
Jesse Rosenberger
1d0021933e
Publish
- apollo-server-azure-functions@2.4.0-alpha.2
 - apollo-server-cloud-functions@2.4.0-alpha.2
 - apollo-server-cloudflare@2.4.0-alpha.2
 - apollo-server-core@2.4.0-alpha.2
 - apollo-server-express@2.4.0-alpha.2
 - apollo-server-hapi@2.4.0-alpha.2
 - apollo-server-integration-testsuite@2.4.0-alpha.2
 - apollo-server-koa@2.4.0-alpha.2
 - apollo-server-lambda@2.4.0-alpha.2
 - apollo-server-micro@2.4.0-alpha.2
 - apollo-server-plugin-base@0.3.0-alpha.2
 - apollo-server-testing@2.4.0-alpha.2
 - apollo-server@2.4.0-alpha.2
 - graphql-extensions@0.5.0-alpha.2
2019-01-23 15:04:23 +02:00
Jesse Rosenberger
2ed1c0e074
Revert (as intended!) "[debug] Print out documentStore stats every 60 seconds."
This reverts commit 7a0d0e6e96, as I intended
when I originally introduced it.

Ref: https://github.com/apollographql/apollo-server/pull/2111#issuecomment-454779949
2019-01-23 14:56:50 +02:00
renovate[bot]
ab632ea38c
chore(deps): update dependency lerna to v3.10.7 (#2214) 2019-01-23 12:26:42 +00:00
renovate[bot]
120762f014
chore(deps): update dependency @types/koa-router to v7.0.39 (#2213) 2019-01-23 11:30:16 +00:00
renovate[bot]
f09a334f03
chore(deps): update dependency @types/hapi to v17.8.5 (#2212) 2019-01-23 10:28:13 +00:00
renovate[bot]
e2bfc62275
chore(deps): update dependency @types/express to v4.16.1 (#2211) 2019-01-23 09:26:52 +00:00
Fabian Schneider
06e49077d8 Fix cache policy calculation when a hint has maxAge 0 (#2197)
Fixes apollographql/apollo-cache-control#11.
2019-01-22 16:53:10 -05:00
renovate[bot]
e0c3ae47ed
chore(deps): update dependency supertest to v3.4.2 (#2207) 2019-01-22 10:25:39 +00:00
renovate[bot]
e219887513
chore(deps): update dependency lerna to v3.10.6 (#2200) 2019-01-19 06:21:45 +00:00
renovate[bot]
0d679857ca
chore(deps): update dependency @types/jest to v23.3.13 (#2199) 2019-01-19 05:24:59 +00:00
renovate[bot]
488cccc7e4
chore(deps): update dependency @types/hapi to v17.8.4 (#2198) 2019-01-19 04:24:23 +00:00