Commit graph

1928 commits

Author SHA1 Message Date
Martijn Walraven
54a8fac80b RESTDataSource: Serialize request bodies that have a toJSON method as JSON 2018-07-11 14:31:32 -07:00
uosl
1022ae17ed RESTDataSource: Do not serialize body values that aren't objects (#1316) 2018-07-11 13:53:56 -07:00
Martijn Walraven
c200df05d3 RESTDataSource: Add data to errors thrown for error responses
Closes #1311.
2018-07-11 13:49:35 -07:00
Evans Hauser
de4760ba3b
Expose Cors option from vanilla ApolloServer constructor (#1335)
* add cors option to apollo-server's constructor

* docs: add cors option to costructor for apollo-server

* expose CorsOptions from vanilla and express integrations

* Update apollo-server.md
2018-07-11 13:46:51 -07:00
Gauthier Rodaro
ecc56690df RESTDataSource: add didReceiveResponse method (#1325) 2018-07-11 06:17:03 -07:00
renovate[bot]
890e10b799
chore(deps): update dependency apollo-hexo-config to v1.0.8 (#1329)
This Pull Request updates dependency [apollo-hexo-config](https://github.com/apollographql/apollo-hexo-config) from `v1.0.7` to `v1.0.8`



<details>
<summary>Release Notes</summary>

### [`v1.0.8`](https://github.com/apollographql/apollo-hexo-config/compare/v1.0.7...v1.0.8)
[Compare Source](https://github.com/apollographql/apollo-hexo-config/compare/v1.0.7...v1.0.8)


---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
2018-07-10 16:20:27 -07:00
renovate[bot]
f2ff23fba6 chore(deps): update dependency apollo-hexo-config to v1.0.8 (#1329)
This Pull Request updates dependency [apollo-hexo-config](https://github.com/apollographql/apollo-hexo-config) from `v1.0.7` to `v1.0.8`



<details>
<summary>Release Notes</summary>

### [`v1.0.8`](https://github.com/apollographql/apollo-hexo-config/compare/v1.0.7...v1.0.8)
[Compare Source](https://github.com/apollographql/apollo-hexo-config/compare/v1.0.7...v1.0.8)


---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
2018-07-10 16:18:55 -07:00
Prosper Otemuyiwa
9034ac95af
Add redirect for file-uploads (#1328) 2018-07-10 14:02:01 -07:00
Evans Hauser
f9373bf341
add graphql types referenced in creating-directives 2018-07-10 10:26:21 -07:00
Evans Hauser
2d7af8b4b3
Add CDN and APQ to What's new (#1320)
* add apq and cdn to what's new section

* fix typos in documentation
2018-07-10 10:07:50 -07:00
Radu Achim
e83dcbc433 Round the ttl to an integer so that redis doesn't b0rk (#1323)
Fixes #1306.
2018-07-10 09:50:06 -07:00
Prosper Otemuyiwa
61b4939327
Enable GraphQLUpload for Apollo Server 2.0 (#1322)
* export GraphQLUpload

* fix GraphQLScalar typing
2018-07-10 05:36:34 +01:00
Evans Hauser
13b796fe34
Publish
- apollo-cache-control@0.2.0-rc.0
 - apollo-datasource-rest@2.0.0-rc.7
 - apollo-engine-reporting@0.0.0-rc.1
 - apollo-server-caching@2.0.0-rc.7
 - apollo-server-cloudflare@2.0.0-rc.7
 - apollo-server-core@2.0.0-rc.7
 - apollo-server-env@2.0.0-rc.7
 - apollo-server-errors@2.0.0-rc.7
 - apollo-server-express@2.0.0-rc.7
 - apollo-server-hapi@2.0.0-rc.7
 - apollo-server-integration-testsuite@2.0.0-rc.7
 - apollo-server-koa@2.0.0-rc.7
 - apollo-server-lambda@2.0.0-rc.7
 - apollo-server-memcached@2.0.0-rc.7
 - apollo-server-micro@2.0.0-rc.7
 - apollo-server-redis@2.0.0-rc.7
 - apollo-server@2.0.0-rc.7
 - apollo-tracing@0.2.0-rc.0
 - graphql-extensions@0.1.0-rc.1
2018-07-09 19:32:59 -07:00
Evans Hauser
e29f8048e4
Enable engine reporting in Lambda (#1313)
* add disableInterval option to engine reporting

* set engine options for lambda

* lambda: add comment on constructor

* lambda: update readme typo and include callout to use graphql.js

* disableInterval -> sendReportsImmediately

* use sendReportsImmediately correctly and fix compilation

* uses new Header to fix different header combination, fixes #1301

* add apollo-server-env dependency

* fix logic error in engine reporting
2018-07-09 19:29:05 -07:00
Martijn Walraven
f551e2bb44 Use apq prefix for persisted query caching 2018-07-09 19:28:21 -07:00
Martijn Walraven
9e60f42845 Use main cache for persisted queries by default 2018-07-09 19:25:09 -07:00
Martijn Walraven
f8feca870a Move lru-cache dependency to apollo-server-caching 2018-07-09 16:51:30 -07:00
Martijn Walraven
d01b18a704 Update GraphQL Playground version 2018-07-09 16:35:30 -07:00
Danilo Bürger
314f0ecf43 Hint about Upload scalar when setting schema manually (#1318) 2018-07-09 14:40:22 -07:00
Jesse Rosenberger
075c0527df
Also rename playground to graphql-playground in _config.yml. 2018-07-09 10:08:05 -07:00
Jesse Rosenberger
8ad31377d8
Follow-up editorial for GraphQL Playground doc. (#1270). 2018-07-09 08:54:08 -07:00
C. T. Lin
dbaa465646 Apollo Server 2 Koa integration (#1282)
* koa integration

* use koa-bodyparser v3 for node 6 support

* use middlewareFromPath instead of koa-router

* use async/await in koa fileUploadMiddleware
2018-07-06 13:52:56 -07:00
Renovate Bot
f508c04645 chore(deps): update dependency @types/node to v9.6.23 2018-07-06 03:04:04 +00:00
Evans Hauser
02d31559da
Add GraphQL Playground Documentation (#1270)
* add initial playground documentation

* link to playground in whats-new

* address feedback
2018-07-05 16:17:39 -07:00
Hugh Willson
c356bcf3f2 Apollo Server 2 Micro integration (#1279)
* Initial basic Micro integration

* Wire up health check capabilities

* Add playground support; Refactoring

* Add custom path support

* Add file upload support

* Add subscription support

* Documentation and formatting updates

* Wire up tests

* Add Node 10 workaround for file upload testing

* Code review changes (docs, naming, formatting)

* Adjust exports to line up with other integrations

* micro: add graphql to npm install and lines to highlight in docs
2018-07-05 11:40:15 -07:00
Martijn Walraven
94d4d4968c Use for-of loops instead of standard for loops 2018-07-04 22:31:55 +02:00
Martijn Walraven
4793c5ad7e Rename apollo-cache-control-js and apollo-tracing-js and unify configs 2018-07-04 22:26:28 +02:00
Martijn Walraven
4114bc5a0b Enable strict typing for apollo-server-core and fix issues 2018-07-04 21:31:55 +02:00
Danilo Bürger
73a5da149a Replaced RESTDataSource with generic DataSource typing (#1293) 2018-07-04 09:26:39 +02:00
Evans Hauser
19c8adf019
Import apollo-cache-control-js (#1294)
* Initial commit

* Add .npmignore to avoid ignoring lib when publishing

* 0.0.2

* Update graphql-extensions dependency to 0.0.2

* 0.0.3

* Reorganize code and add tests

* 0.0.4

* Add tests and reorganize code

* 0.0.5

* Update dependency to graphql-extensions 0.0.4

* 0.0.6

* Update graphql-extensions dependency and downgrade TS target

* 0.0.7

* Update README

* Update README

* Update README

* Update README

* Add import instructions for TypeScript to README (#7)

* Add cache hints when the directive is defined on interfaces (#10)

* Increase version range for `graphql` peerDependency. (#12)

* 0.0.8

* Update dependencies

* 0.0.9

* [apollo-bot] Update the Issue/PR Templates with auto label (#13)

* [apollo-bot] Update the Templates with docs label (#15)

* Add cache hints to info.cacheControl (#16)

This exposes the `cacheControl` hints on the schema, to the resolvers at runtime.

* Update `graphql` peer dependency range to allow 0.13.x.

* dev: Update TypeScript to latest version, v2.7.2.

* dev: Update jest & dependencies to latest versions.

* dev: Update type definitions for `graphql`, `node` and `jest`.

* dev: Update `graphql` to latest version, v0.13.2.

* 0.0.10

* Add defaultMaxAge option

This is an easy way to quickly say "I want everything in my schema to be cached
for 5 seconds". You can override it with specific maxAges on specific fields or
types.

An upcoming release of apollo-server-* will allow you to specify options to
cacheControl.

* Add CircleCI config

* Add partial CHANGELOG

* 0.1.0

* Honor overwrite default maxAge with maxAge=0 (Fixes #22) (#23)

* 0.1.1

* Allow default caching to apply to interfaces

* remove unused files

* update versions and use a-s style config

* run prettier

* fix tests and typing
2018-07-03 15:08:42 -07:00
Evans Hauser
8496387c78
Import apollo-tracing-js (#1292)
* Initial commit

* 0.0.3

* Replace endOffset with duration in resolver calls

* 0.0.4

* Fix duration

* 0.0.5

* Remove unnecessary schema level resolve function and return schema

* Update README

* 0.0.6

* Update README

* Update dependencies

* 0.0.7

* Update README

* set package.json to point to this repository (#3)

* Update dependencies

Fixes #4.

* 0.0.8

* Add asynciterable support to tsconfig.json

* Skip trace collection when context or context._traceCollector is undefined

Fixes #5.

* 0.0.9

* Rewrite to use graphql-extensions

* 0.0.10

* 0.0.11

* 0.1.0

* Update graphql-extensions dependency and downgrade TS target

* 0.1.1

* Update README

* Update README

* Increase version range for `graphql` peerDependency. (#7)

* 0.1.2

* Update dependencies

* 0.1.3

* [apollo-bot] Update the Issue/PR Templates with auto label (#9)

* Update `graphql` peer dependency range to allow 0.13.x.

* dev: Update TypeScript to latest version, v2.7.2.

* dev: Update jest & dependencies to latest versions.

* dev: Update type definitions for `graphql`, `node` and `jest`.

* Allow `undefined` to return from `format`. (#12)

* Allow `undefined` to return from `format`.

TypeScript 2.7 introduced new "Strict Class Instantiation" rules which,
as the name suggests, require properties which are intended to be set
(eventually, to a type) be set during construction.

Before this change, the `TracingExtension` class was deferred setting these
private properties (namely, `startWallTime`, `endWallTime`, `startHrTime`
and `duration`), but not during instantiation which required setting
marking them as optional and guarding their usage in other methods which
might use those (temporarily `undefined`, if even for a tick) properties.
For example, the expectation that `format` is _only_ called after
`requestDidStart` is not guaranteed with this configuration, even if it is
expected under normal operation.

Therefore, this change adds the additional guarding and updates the `format`
method to return `undefined` in the event that it doesn't have the appropriate
data.

* Update `graphql-extensions` dependency to `~0.0.9`.

Specifically, to take advantage of a type which landed in
`graphql-extensions@0.0.9` thanks to
https://github.com/apollographql/graphql-extensions/pull/10.

* 0.1.4

* Update for graphql-extensions@0.1.0 API (#13)

* Upgrade to TypeScript 2.8

* Add tslint and prettier

* Update for graphql-extensions@0.1.0 API

* 0.2.0-beta.0

* Make work with newest API usage

format() now gets called before the requestDidStart() EndHandler.

* 0.2.0-beta.1

* remove unused files from tracing package

* upgrade packages, fix compilation bugs, and add test
2018-07-03 13:53:25 -07:00
C. T. Lin
8c8729f066 fix README badge links and test imports (#1281) 2018-07-03 10:32:02 -07:00
Martijn Walraven
0b5c7f31c8 Export RequestOptions from apollo-datasource-rest 2018-07-03 14:45:13 +02:00
Martijn Walraven
23965de8a1 Add example of intercepting fetches and resolving URLs to data source docs 2018-07-03 13:46:18 +02:00
Martijn Walraven
928ef7d441
Allow dynamic configuration of data sources (#1277)
Closes #1181 and #1238.
2018-07-03 11:41:43 +02:00
Martijn Walraven
16a336d3e5 Remove unused core-js and source-map-support dependencies from graphql-extensions 2018-07-03 09:58:47 +02:00
Renovate Bot
ae1ff7246f chore(deps): update dependency multer to v1.3.1 2018-07-03 07:42:23 +00:00
Evans Hauser
035175144a
lambda: add existance check for result 2018-07-02 18:04:20 -07:00
Evans Hauser
19478920e4
Removes flattening of Errors inside of formatApolloErrors (#1288)
* remove unnesting of errors to support yup

* add test for error thrown by yup
2018-07-02 14:54:32 -07:00
Mordechai Zuber
dae5349d57 Clarify docs for hybrid connections with middleware (#1285) 2018-07-02 14:09:07 -07:00
Vince Picone
11f0383384 Add npm start script to now setup (#1276)
The package.json requires a start script, copying as is gives an error in now CLI: `> Error! Missing `start` (or `now-start`) script in `package.json`. See: https://docs.npmjs.com/cli/start`
2018-07-02 14:07:19 -07:00
Renovate Bot
c5fc0576d2 chore(deps): update dependency @types/mocha to v5.2.4 2018-07-02 20:53:44 +00:00
Jake Dawkins
b812eec906
added related guides (#1286) 2018-07-02 14:40:12 -04:00
C. T. Lin
35776c9836 remove .DS_Store (#1280) 2018-07-02 11:33:15 -07:00
Prosper Otemuyiwa
d75a4d88a0
Merge pull request #1283 from apollographql/remove-uploads
Remove File Uploads, APQ & CDN Integration. Move to Guides!
2018-07-02 18:57:16 +01:00
unicodeveloper
6c583d67fb Set up redirects 2018-07-02 08:15:29 +01:00
unicodeveloper
9d326ff8ce Delete the files 2018-07-02 08:10:24 +01:00
unicodeveloper
660c034dbf Remove APQ, CDN integration and file uplaods from side bar 2018-07-02 08:09:14 +01:00
Martijn Walraven
3ad0c43b82 Fix test typings 2018-06-30 08:35:15 +02:00
Evans Hauser
63f6b4790b
Publish
- apollo-datasource-rest@2.0.0-rc.6
 - apollo-engine-reporting@0.0.0-rc.0
 - apollo-server-caching@2.0.0-rc.6
 - apollo-server-cloudflare@2.0.0-rc.6
 - apollo-server-core@2.0.0-rc.6
 - apollo-server-env@2.0.0-rc.6
 - apollo-server-errors@2.0.0-rc.6
 - apollo-server-express@2.0.0-rc.6
 - apollo-server-hapi@2.0.0-rc.6
 - apollo-server-integration-testsuite@2.0.0-rc.6
 - apollo-server-lambda@2.0.0-rc.6
 - apollo-server-memcached@2.0.0-rc.6
 - apollo-server-redis@2.0.0-rc.6
 - apollo-server@2.0.0-rc.6
 - graphql-extensions@0.1.0-rc.0
2018-06-29 11:27:36 -07:00