Commit graph

2797 commits

Author SHA1 Message Date
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
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
Remy Korrelboom
6ebb60a86c (fastify) Update package-lock 2019-01-02 14:43:45 +01:00
Remy Korrelboom
94e9a07cd2 (fastify) Fix linting issues 2019-01-02 14:24:57 +01:00
Remy Korrelboom
05158d3e0d (fastify) Implement fastify upload middleware 2019-01-02 14:24:57 +01:00
Jesse Rosenberger
59873843a8 (fastify) Remove duplicative assertion in upload initialization. 2019-01-02 14:24:56 +01:00
Jesse Rosenberger
99bf841220 (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!
2019-01-02 14:24:56 +01:00
Jesse Rosenberger
fa621c60bb (fastify) Tweaks to re-align with the parallel work in #2054. 2019-01-02 14:24:55 +01:00
Remy Korrelboom
482cdad6fa feat(fastify) Implement the fastify createHandler as a synchronous method #626 2019-01-02 14:24:49 +01:00
Remy Korrelboom
fb023a5d4c feat(fastify) Update README's with fastify createHandler interface #626 2019-01-02 14:24:48 +01:00
Remy Korrelboom
88ff16192f feat(fastify) Fix integration test for node 10 #626 2019-01-02 14:24:48 +01:00
Remy Korrelboom
a1d2b74c31 feat(fastify) Use createHandler instead of applyMiddleware #626 2019-01-02 14:24:47 +01:00
Remy Korrelboom
bacdeae80d feat(fastify) Apollo Fastify server integration resolve #626 2019-01-02 14:24:47 +01: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