Commit graph

1673 commits

Author SHA1 Message Date
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
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
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
Jesse Rosenberger
22ee1d508e
chore(deps): update dependency meteor-theme-hexo to v1.0.15 2018-06-21 16:45:17 +03: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
unicodeveloper
0d863f736f Add file uploads feature section to Apollo Server docs 2018-06-20 19:27:46 +01:00
clarencenpy
406b4fda4b update link to point to the package on npmjs 2018-06-20 19:54:52 +02:00
Jesse Rosenberger
f4bba1de1e
docs: Add version to _config.yml for "Edit on GitHub" on version branches. 2018-06-20 18:31:04 +03:00
Jesse Rosenberger
17582a7f7b
chore(deps): update dependency meteor-theme-hexo to v1.0.14
Not sure if Renovate will catch this due to a misconfiguration on my part.
2018-06-20 18:09:12 +03: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
60c0f587c1 Update data sources docs 2018-06-19 23:47:25 +02:00
Jesse Rosenberger
7f7f70e13c
docs: Update middleware migration instructions in 2.0 migration guide.
This removes an unnecessary instruction to install `apollo-server` when using the middleware option with Apollo Server 2.0.

While this was necessary in earlier versions of the Apollo Server 2.0 alpha and beta releases, it is no longer needed.
2018-06-19 22:57:09 +03: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
Prosper Otemuyiwa
2913465c41
Merge pull request #1187 from danferreira/fix-docs
[DOCS] added missing 'new' keyword at error handling examples
2018-06-18 02:03:58 -04:00
Prosper Otemuyiwa
9070a9673e
Merge pull request #1186 from amitport/patch-1
remove extra '/' from docs
2018-06-18 02:00:16 -04:00
Daniel Ferreira
f07afc17aa added missing 'new' keyword 2018-06-18 02:36:32 -03:00
Amit Portnoy
3cb2e41be3
remove extra '/' from docs
the url is incorrect: example.com//.well-known/apollo/server-health
2018-06-18 08:14:52 +03:00
Prosper Otemuyiwa
491997a105
Merge pull request #1185 from apollographql/fix-errors
Change  to  in new pattern of using apollo server 2
2018-06-17 15:02:00 -04:00
unicodeveloper
7c1f7a6f54 Change to in new pattern of using apollo server 2 2018-06-17 14:55:54 -04:00
Jesse Rosenberger
f4d1ac5111 docs: Change links away from contentless deployment index page.
This was still linked from the v2 getting started page.  While it will
eventually link to the "Deployment" guide index page where we'll offer
guides for other deployment options, that content is not written.

For now, we'll offer those getting statred to deploy with Heroku, which is
written!

Ref: https://twitter.com/jevakallio/status/1007915638919192577
cc (and thanks) to @jevakallio for pointing this out.
2018-06-16 13:55:07 +03: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
0eed62378f
docs: add install for rest data source 2018-06-15 10:26:24 -07:00
Jesse Rosenberger
d28982bddc
docs: Add version "2" back, which was lost in a merge.
This was lost in 639b104232.
2018-06-15 17:37:15 +03:00
Daniele Zurico
fdfb53220b docs: Correct typos in Features/Subscriptions. (#1178) 2018-06-15 16:06:10 +03:00
Evans Hauser
ff91ba93d4
docs: add subscriptions by @daniele-zurico into the index 2018-06-15 00:00:25 -07:00
Daniele Zurico
d4a38b8275 AS2: Docs for subscriptions (#1165)
* add doc for subscriptions

* apply few changes to the readme

* apply few changes to the readme

* add more informations in case req is null

* changed last sentence

* apply comments

* typo

* remove idea folder

* fix indentation

* fix typo

* subscriptions with middleware

* subscriptions with middleware

* subscriptions with middleware
2018-06-14 23:39:19 -07:00
Evans Hauser
1592c545dc
docs: change beta to release candidate 2018-06-14 23:37:36 -07:00