Commit graph

2611 commits

Author SHA1 Message Date
renovate[bot]
a0ecc79e59
chore(deps): update dependency typescript to v3.2.4 (#2195) 2019-01-18 07:20:07 +00:00
renovate[bot]
5d873bd624
chore(deps): update dependency graphql-tag to v2.10.1 (#2194) 2019-01-18 05:22:41 +00:00
renovate[bot]
a568a1b8ce
chore(deps): update dependency @types/lodash to v4.14.120 (#2193) 2019-01-18 04:19:56 +00:00
renovate[bot]
3c1b0120a3
chore(deps): update dependency @types/koa-router to v7.0.38 (#2192) 2019-01-18 03:20:21 +00:00
renovate[bot]
541bc7aa15
chore(deps): update dependency graphql to v14.1.1 (#2191) 2019-01-17 05:21:49 +00:00
renovate[bot]
6e2cc5a8c5
chore(deps): update dependency @apollographql/apollo-tools to ^0.3.0 (#2190) 2019-01-17 04:22:44 +00:00
renovate[bot]
2df3df63c3
chore(deps): update dependency supertest to v3.4.1 (#2188) 2019-01-16 13:25:58 +00:00
Jesse Rosenberger
33d1f82814
Publish
- apollo-cache-control@0.5.0-alpha.1
 - apollo-datasource-rest@0.3.0-alpha.1
 - apollo-datasource@0.3.0-alpha.1
 - apollo-engine-reporting@0.3.0-alpha.1
 - apollo-server-azure-functions@2.4.0-alpha.1
 - apollo-server-cache-memcached@0.3.0-alpha.1
 - apollo-server-cache-redis@0.3.0-alpha.1
 - apollo-server-caching@0.3.0-alpha.1
 - apollo-server-cloud-functions@2.4.0-alpha.1
 - apollo-server-cloudflare@2.4.0-alpha.1
 - apollo-server-core@2.4.0-alpha.1
 - apollo-server-express@2.4.0-alpha.1
 - apollo-server-hapi@2.4.0-alpha.1
 - apollo-server-integration-testsuite@2.4.0-alpha.1
 - apollo-server-koa@2.4.0-alpha.1
 - apollo-server-lambda@2.4.0-alpha.1
 - apollo-server-micro@2.4.0-alpha.1
 - apollo-server-plugin-base@0.3.0-alpha.1
 - apollo-server-testing@2.4.0-alpha.1
 - apollo-server@2.4.0-alpha.1
 - apollo-tracing@0.5.0-alpha.1
 - graphql-extensions@0.5.0-alpha.1
2019-01-16 13:11:21 +02:00
Jesse Rosenberger
7a0d0e6e96
[debug] Print out documentStore stats every 60 seconds.
In an effort to see how effective this cache is in production during this
alpha phase, we'll print out the stats on the document store every 60
seconds.
2019-01-16 13:07:17 +02:00
Jesse Rosenberger
be7162094c
Shift the burden of object approximation into the ApolloServerBase class.
The implementation of object-size approximation which is used for cache
eviction purposes in the `InMemoryLRUCache` implementation (via `lru-cache`)
was a short-term location for extensible logic which is better located
within `ApolloServerBase`.

This is particularly important since future logic may necessitate knowing or
understanding the current size (roughly, memory usage) of the in-memory
storage.  Effective immediately, this adds support for providing a `dispose`
function which is called when an object is purged from the cache to make
room for another.
2019-01-16 12:46:48 +02:00
renovate[bot]
9d047ebb36
chore(deps): update dependency @types/graphql (#2187) 2019-01-16 04:30:31 +00:00
Jesse Rosenberger
0879a1267e
Be considerate of variable length utf-8 encodings in InMemoryLRUCache.
Previously, this used the `JSON.stringify` length, but this is slightly more
aware.
2019-01-15 17:45:20 +02:00
Jesse Rosenberger
1a9d65dd81
Guard against (currently impossible) failure to read from documentStore.
While the implementation of the `documentStore` is currently simple enough
to never throw (it is in-memory), it makes some sense to guard against future
extended functionality where an exception might be raised.

Since storing this object in a distributed memory store isn't currently
feasible, I'm not sure what such an exception would be right now, but I
don't mind being proactive!

Ref: https://github.com/apollographql/apollo-server/pull/2111/files#r247618501
2019-01-15 17:03:00 +02:00
Jesse Rosenberger
f546086e95
Fix typos/spacing in commentary.
Of my own making!
2019-01-15 17:03:00 +02:00
Jesse Rosenberger
2652057c33
Clarify comments surrounding documentStore, which led to confusion.
The parsed/validated cache store is on by default.  While it could be disabled,
in theory, it cannot be disabled since its an internal property of the
request pipeline processor class.

See confusion here:

  https://github.com/withspectrum/spectrum/pull/4533#issuecomment-453446535
2019-01-15 17:02:59 +02:00
Jesse Rosenberger
f33ae19f6d
Ensure requestContext.document set, irregardless of documentStore use.
Without this change, the `document` property was not set on the
`requestContext` for consumption by request pipeline plugins.

To further guard against this oversight, I've removed the extra `document`
variable which was being used as scoped state for the document and switched to
directly using (and assigning to) the `requestContext.document`.

Nice catch, @glasser!

Ref: https://github.com/apollographql/apollo-server/pull/2111/files#r247617469
2019-01-15 17:02:59 +02:00
Jesse Rosenberger
45f14a2971
Fix incorrect contraction in code comment, per feedback.
Ref: https://github.com/apollographql/apollo-server/pull/2111/files#r247616489
2019-01-15 17:02:58 +02:00
Jesse Rosenberger
355b7f3453
Update package-lock.json http resolutions for hopefully the last time.
Since the registry should be fixed, this should be the last time that we
need to search and replace those resolutions in this file to avoid merge
conflicts and unnecessary staging of `package-lock.json` changes which are
otherwise unrelated to our changes.

(Though to be clear, the registry setting always takes precedence over the
resolutions in this `package-lock.json` file so the scheme was already
strictly enforced to `http` unless the user's local npm configuration had
been manipulated to behave otherwise.)

Ref: https://npm.community/t/some-packages-have-dist-tarball-as-http-and-not-https/285/50
2019-01-15 15:42:35 +02:00
Jesse Rosenberger
9057287856
Add @types/fast-json-stable-stringify. 2019-01-15 15:33:18 +02:00
Jesse Rosenberger
ea7da3a38c
Merge branch 'master' into abernix/cache-parsed-validated 2019-01-14 20:39:36 +02:00
renovate[bot]
9fbf1ea677
chore(deps): update dependency yup to v0.26.7 (#2175) 2019-01-11 09:30:32 +00:00
renovate[bot]
2498dc7b1e
chore(deps): update dependency tslint to v5.12.1 (#2174) 2019-01-11 07:33:06 +00:00
renovate[bot]
ae2fa69736
chore(deps): update dependency lerna to v3.10.5 (#2173) 2019-01-11 04:33:09 +00:00
renovate[bot]
265b403196
chore(deps): update dependency lerna to v3.10.2 (#2169) 2019-01-10 04:19:39 +00:00
renovate[bot]
cc3ad8c854
chore(deps): update dependency lerna to v3.10.1 (#2166) 2019-01-09 04:17:26 +00:00
Jesse Rosenberger
9b8dc1b607
Address unaddressed feedback from #1223.
These were things I'd suggested prior to merging and I just happened to come across it again, only to find they were still outstanding:

https://github.com/apollographql/apollo-server/pull/1223
2019-01-08 20:25:18 +02:00
renovate[bot]
283013c253
chore(deps): update dependency lerna to v3.9.0 (#2163) 2019-01-08 04:24:14 +00:00
renovate[bot]
68aafbb796
chore(deps): update dependency @types/jest to v23.3.12 (#2161) 2019-01-07 10:24:38 +00:00
renovate[bot]
d069809b88
chore(deps): update dependency lerna to v3.8.5 (#2158) 2019-01-05 05:12:35 +00:00
renovate[bot]
063da8b344
chore(deps): update dependency @types/koa-router to v7.0.37 (#2157) 2019-01-05 04:30:38 +00:00
renovate[bot]
acb5984353
chore(deps): update dependency lerna to v3.8.4 (#2153) 2019-01-03 05:31:56 +00:00
renovate[bot]
6cfbd44e18
chore(deps): update dependency @types/koa-router to v7.0.36 (#2152) 2019-01-03 04:27:36 +00:00
renovate[bot]
225139129e
chore(deps): update dependency redis-mock to v0.42.0 (#2150) 2019-01-02 04:26:19 +00:00
renovate[bot]
0d28fbfd9a
chore(deps): update dependency lerna to v3.8.1 (#2148) 2019-01-01 06:19:02 +00:00
renovate[bot]
0c7d66ef39
chore(deps): update dependency @types/jest to v23.3.11 (#2147) 2019-01-01 05:16:51 +00:00
renovate[bot]
7b438b6e99
chore(deps): update dependency @types/graphql to v14.0.4 (#2146) 2019-01-01 04:27:40 +00:00
renovate[bot]
ab696e8b9b
chore(deps): update dependency husky to v1.3.1 (#2142) 2018-12-28 07:19:55 +00:00
renovate[bot]
394cb9d090
chore(deps): update dependency @types/redis to v2.8.10 (#2126) 2018-12-22 03:33:41 +00:00
renovate[bot]
ac9cb2c8a5
chore(deps): update dependency lerna to v3.8.0 (#2123) 2018-12-21 06:19:01 +00:00
renovate[bot]
ad8539c24e
chore(deps): update dependency @types/redis to v2.8.9 (#2122) 2018-12-21 04:20:56 +00:00
renovate[bot]
dd280daceb
chore(deps): update dependency @types/aws-lambda to v8.10.17 (#2121) 2018-12-21 03:21:58 +00:00
renovate[bot]
64bf1ce2cf
chore(deps): update dependency lerna to v3.7.1 (#2119) 2018-12-20 05:20:27 +00:00
renovate[bot]
0cde716a11
chore(deps): update dependency @types/node to v10.12.18 (#2118) 2018-12-20 04:19:15 +00:00
wtgtybhertgeghgtwtg
ccba8c87da Switch json-stable-stringify to fast-json-stable-stringify. (#2065)
* refactor: switch `json-stable-stringify` to `fast-json-stable-stringify`

* chore: drop `@types/json-stable-stringify`

* Update CHANGELOG.md for #2065.
2018-12-19 20:06:17 +02:00
renovate[bot]
bb2fc6d862
chore(deps): update dependency husky to v1.3.0 (#2116) 2018-12-19 05:25:38 +00:00
renovate[bot]
4add1c3a74
chore(deps): update dependency @types/node to v10.12.17 (#2115) 2018-12-19 04:24:45 +00:00
renovate[bot]
6dfd6a3b70
chore(deps): update dependency @types/hapi to v17.8.2 (#2114) 2018-12-19 03:24:50 +00:00
renovate[bot]
eeb54a41c6
chore(deps): update dependency @types/aws-lambda to v8.10.16 (#2113) 2018-12-19 02:46:07 +00:00
renovate[bot]
a8980494bf
chore(deps): update dependency tslint to v5.12.0 (#2112) 2018-12-19 02:41:09 +00:00
Jesse Rosenberger
7697623789
Publish
- apollo-cache-control@0.5.0-alpha.0
 - apollo-datasource-rest@0.3.0-alpha.0
 - apollo-datasource@0.3.0-alpha.0
 - apollo-engine-reporting@0.3.0-alpha.0
 - apollo-server-azure-functions@2.4.0-alpha.0
 - apollo-server-cache-memcached@0.3.0-alpha.0
 - apollo-server-cache-redis@0.3.0-alpha.0
 - apollo-server-caching@0.3.0-alpha.0
 - apollo-server-cloud-functions@2.4.0-alpha.0
 - apollo-server-cloudflare@2.4.0-alpha.0
 - apollo-server-core@2.4.0-alpha.0
 - apollo-server-express@2.4.0-alpha.0
 - apollo-server-hapi@2.4.0-alpha.0
 - apollo-server-integration-testsuite@2.4.0-alpha.0
 - apollo-server-koa@2.4.0-alpha.0
 - apollo-server-lambda@2.4.0-alpha.0
 - apollo-server-micro@2.4.0-alpha.0
 - apollo-server-plugin-base@0.3.0-alpha.0
 - apollo-server-testing@2.4.0-alpha.0
 - apollo-server@2.4.0-alpha.0
 - apollo-tracing@0.5.0-alpha.0
 - graphql-extensions@0.5.0-alpha.0
2018-12-18 17:14:02 +02:00