Commit graph

757 commits

Author SHA1 Message Date
Martijn Walraven
acedc2690b v2.0.0-rc.3 2018-06-24 12:30:42 +02:00
Renovate Bot
b5723df0ba chore(deps): update dependency @types/aws-lambda to v8.10.7 2018-06-23 04:29:23 +00:00
Evans Hauser
846579db33
update README's and remove docs for registerServer (fixes #1216) 2018-06-22 17:51:56 -07:00
David Glasser
049a61a368 Send APQ info to traces 2018-06-22 17:25:41 -07:00
Evans Hauser
e62dc4e97d
AS2: Support APQ for Batches (#1234)
* add handling of persisted queries for batched requests

* Update runHttpQuery.ts

* fix prettier
2018-06-22 16:10:01 -07:00
Matías Olivera
76da232c1c Add graphql peer dependency to server integrations (#1232) 2018-06-22 15:55:08 -07:00
Matías Olivera
69185082f0 Export UserInputError from lambda integration (#1230) 2018-06-22 14:35:52 -07:00
Evans Hauser
98fd7ae1fd
test cache-control set to false after bug from #1217 2018-06-22 12:16:04 -07:00
Evans Hauser
ae14665aea
include test for tracing and add server creation helper method 2018-06-22 11:14:15 -07:00
Martijn Walraven
ebacd8fcda Add type dependencies to apollo-server-express 2018-06-22 10:15:59 +02:00
Renovate Bot
17bcf3e7b7 chore(deps): update dependency @types/koa-router to v7.0.30 2018-06-22 06:27:53 +00:00
Evans Hauser
4770f381d3
v2.0.0-rc.2 2018-06-21 19:53:33 -07:00
Matías Olivera
944a641770 Add missing apollo-upload-server dependency (#1221)
* Add missing apollo-upload-server dependency

* Reorder dependencies (drive-by)
2018-06-21 19:36:18 -07:00
David Glasser
742fb41bc3 Amortize encoding over each trace 2018-06-21 16:06:36 -07:00
Evans Hauser
3bc09decb4
v2.0.0-rc.1 2018-06-21 15:33:07 -07:00
Evans Hauser
8bd504505d
lambda: fix typings 2018-06-21 15:07:01 -07:00
Alessio Dionisi
bb4f1c3a36 Apollo Server 2.0: AWS Lambda Integration (#1188)
* initial implementation of aws lambda integration for apollo server 2

* ApolloServer class

* package.json cleanup

* parse json of body

* createHandler function, complete README

* cors options

* update readme

* lambdaApollo tests

* fix tests
2018-06-21 13:54:53 -07:00
Evans Hauser
65d7b100e4
CDN cache-control headers (#1138)
* core: return response object from runHttpQuery

* core: change gqlResponse to graphqlResponse and add custom RequestInit type

* core: add cache-control headers based on the calcualted maxAge

* core: add extensions check during cache-control header creation

* core: create headers when cacheControl is not enabled otherwise pass through extensions

* express: initial tests of CDN cach-contol headers

* core: fixed tests with applyMiddleware and pass cacheControl config

* core: cache hint fixes, ignore when no maxAge, and check for rootKeys

* core: check for hints of length 0

* core: node 10 fails file upload test for some stream reason

* docs: add cdn caching section to features

* add space after // in comments

* fix feedback: proxy alignment and response creation

Adds cache-control toggles for http header calculation and stripping out
the cache control extensions from the respose.

Brings the default calculation of headers in line with the proxy.

* fix links in comments

* fix tests with null dereference

* update cdn docs and migration guide to include latest cdn configuration

* add not for engine migration to set engine to false

* add engine set to false in migration guide

* express: fixed tests

* address feedback to use omit and documentation

* docs: cdn caching is alternative to full response caching

* add back epipe check in upload tests
2018-06-21 13:29:14 -07:00
David Glasser
36c595bd12 Upgrade apollo-engine-reporting to beta.13
Smaller default uncompressedReportSizeTarget
2018-06-21 12:38:36 -07:00
Martijn Walraven
35ac867830 Avoid direct imports of node-fetch 2018-06-21 21:35:37 +02:00
Martijn Walraven
2d624c9b28 Remove direct dependency on node-fetch and add @types/ws 2018-06-21 21:28:31 +02:00
Renovate Bot
aedbd76cee chore(deps): update dependency @types/multer to v1.3.7 2018-06-21 19:26:32 +00:00
Evans Hauser
d1878703d3
Move Uploads to constructor and remove enhanceSchema (#1204)
* move uploads into server constructor

* remove enhanceSchema

* address feedback
2018-06-21 12:16:52 -07:00
Renovate Bot
e688cef36a chore(deps): update dependency @types/koa-router to v7.0.29 2018-06-21 15:16:52 +00:00
Martijn Walraven
71a403dfa3 Set cached response TTL based on max-age 2018-06-21 16:51:02 +02:00
Martijn Walraven
14247279ec Remove logFunction
We now support custom extensions, which have a much nicer API.
2018-06-21 16:05:48 +02:00
Martijn Walraven
8914b135df Add error handling to RESTDataSource and extract apollo-server-errors
Because apollo-server-core depends on apollo-datasource-rest, we need to extract errors into their own package to avoid a circular dependency.
2018-06-21 15:28:14 +02:00
Evans Hauser
7c622aa2f5
hapi: tests, add types, and fix #1195 (#1211) 2018-06-20 16:34:42 -07:00
Clarence Ngoh
70a0fad754 export UserInputError from express and hapi integrations (#1206) (#1208) 2018-06-20 16:24:32 -07:00
Evans Hauser
9af856c2c8
Typescript Improvements and esModuleInterop fix (#1210)
* add string input to gql tag

* remove esModuleInterop, tested locally

* change IMPORT_FUNCTION to something real

* fix the rest of the tests
2018-06-20 16:21:50 -07:00
Martijn Walraven
aa0650c4ae Remove unnecessary workaround for ES5 2018-06-20 12:42:36 +02:00
Martijn Walraven
655ead3b1b Move shared mocks to top-level and enforce noImplicitAny 2018-06-20 12:21:52 +02:00
Martijn Walraven
d38e289821 Log RESTDataSource requests in development 2018-06-20 12:00:11 +02:00
Martijn Walraven
0928d79efb Move in memory cache to apollo-server-caching 2018-06-20 11:06:24 +02:00
Martijn Walraven
3f3b0eb1f8 Rename Memcached and Redis cache classes 2018-06-20 10:04:37 +02:00
clarencenpy
958fa65ddb Update data source docs and add instructions for Memcached and Redis caches 2018-06-20 10:04:37 +02:00
Clarence Ngoh
387f25067a rename BadUserInputError to UserInputError (#1197)
reason: "bad" and "error" are redundant
2018-06-19 15:15:24 -07:00
Martijn Walraven
b76c1004e6 Only attempt to parse responses with the right Content-Type as JSON 2018-06-19 13:23:14 +02:00
Martijn Walraven
073655af8e Remove willReceiveCache and willReceiveContext from RESTDataSource 2018-06-19 11:14:22 +02:00
Martijn Walraven
74d7f53501 Add any as default type parameter for TResponse in RESTDataSource 2018-06-19 10:20:13 +02:00
Martijn Walraven
cde54349b3 Extract URLSearchParamsInit type and use it in RESTDataSource 2018-06-19 10:14:59 +02:00
Fabien BERNARD
86fd88ee6f Add type parameter for responses and add PATCH method (#1190) 2018-06-19 09:40:42 +02:00
Clarence Ngoh
43627ec221 Add support for Redis and Memcached with ttls (#1191)
* Refactored caching connectors into their own packages
- apollo-server-caching (exports interface for KeyValueCache)
- apollo-server-caching-memcached
- apollo-server-caching-redis
One issue now is that there is duplication of mocks and test code in each of the packages. It would be better if we had centralized integration tests for all cache connectors, community contributed or otherwise.

* export test suite for cache connectors from `apollo-server-caching`

* fixed tsconfig.json

* added @types
2018-06-18 19:36:51 -07:00
Martijn Walraven
7496eb034d Run test in apollo-datasource-rest as part of monorepo tests 2018-06-18 11:57:19 +02:00
Martijn Walraven
da2c95c410 Remove workaround for TS unused locals 2018-06-18 11:36:01 +02:00
Evans Hauser
b6f88d59ef
express: remove console logs from data source test 2018-06-15 11:17:02 -07:00
Evans Hauser
cba05d9567
remove operation store module because of apq's 2018-06-15 11:16:37 -07:00
Evans Hauser
9588468875
v2.0.0-rc.0 2018-06-14 23:18:07 -07:00
Martijn Walraven
685d3399db Apollo Server 2.0 - Caching + RESTDataSource (#1163)
* Enable declarationMap in tsconfig.json

See http://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html

* Add apollo-server-caching package and improve typings

* Remove superfluous test steps

* Add .npmignore to apollo-server-caching

* Add apollo-server-env and apollo-datasource-rest packages

* Fix broken imports

* Use prepublish instead of prepare

* cache is now passed to data sources from ApolloServer constructor

* fix Object.values to use the object passed in rather than this

* add initial datasource test

* docs: initial data source documentation

* docs: initial data source documentation

* compiles and documentation now highlights code in data-sources.md

* Some changes to the data source docs
2018-06-14 23:13:33 -07:00
Evans Hauser
439ec44135
core: add Scalar Upload with schema is made execuable 2018-06-14 15:58:23 -07:00