Commit graph

820 commits

Author SHA1 Message Date
Evans Hauser
62ff5c6ce6
Improve Subscriptions Dev/Docs Experience (#1255)
* fix hapi playground version, a-s exports subscription url, and document subscriptions

* remove unused subscription lifecycle methods
2018-06-27 09:59:21 -07:00
Martijn Walraven
e0c169dea9 Update GraphQL Playground to fix tracing 2018-06-27 11:56:01 +02:00
Martijn Walraven
6bf286d838 Fix async context test and add test for cloning 2018-06-26 11:57:38 +02:00
Martijn Walraven
7e35305353 Always clone the context if it's not a function
Fixes #1247.
2018-06-26 10:40:41 +02:00
Evans Hauser
3ad05191bd
v2.0.0-rc.5 2018-06-25 16:51:07 -07:00
Alessio Dionisi
2b925c4725 add graphql dependency to docs (#1244) 2018-06-25 16:37:12 -07:00
Evans Hauser
d85ef48070
Ensures formatError receives a value that passes instanceof Error (#1235)
* ensure that formatError receives instanceof Error

* add formatError test for instanceof

* apply Martijn's feedback to usse Object.create 🎉

* check constructor name inside of formatError
2018-06-25 16:36:37 -07:00
Evans Hauser
c88630333c
Hapi: reenable cors test
It seems that hapi does not send all allowed origins in the
Access-Control-Allow-Origin header, so it is necessary to use another
configuration option to see if the config is being propagated
2018-06-25 16:05:59 -07:00
David Glasser
2ca26ab29b v2.0.0-rc.4 2018-06-25 13:58:12 -07:00
David Glasser
325f11408e apollo-engine-reporting: more aggressive signataure 2018-06-25 13:58:03 -07:00
Martijn Walraven
b6e2096876 Allow passing a body to POST, PATCH and PUT in data source 2018-06-25 21:52:19 +02:00
Martijn Walraven
4d7a34f6f5 Add trailing slash to baseURL of data source if needed 2018-06-25 19:54:04 +02:00
Renovate Bot
017aded658 chore(deps): update dependency hapi to v17.5.2 2018-06-25 09:32:26 +00:00
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