Commit graph

1563 commits

Author SHA1 Message Date
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
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
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
Evans Hauser
1f9f307d55
docs: initial engine migration guide 2018-06-14 13:24:56 -07:00
David Glasser
d006d4d83d v2.0.0-beta.11 2018-06-14 12:00:21 -07:00
David Glasser
46bb367f91 cloudflare package does not need to be private 2018-06-14 12:00:09 -07:00
David Glasser
3fccd43bae simplify upload enhanceSchema, rename to installSubscriptionHandlers
also export graphql-tools and graphql-subscriptions from apollo-server-core
2018-06-14 11:57:30 -07:00
David Glasser
1707967518 Specify full path in tsconfig imports
Emacs tide mode seems to require
this (https://github.com/ananthakumaran/tide/pull/238 is supposed to have fixed
it but it didn't work?)
2018-06-14 11:57:30 -07:00
David Glasser
afda13489b improve listen API with callbacks 2018-06-14 11:57:30 -07:00
Evans Hauser
95fe31dbb6 docs: server.listen to app.listen for express examples 2018-06-14 11:57:30 -07:00