Commit graph

350 commits

Author SHA1 Message Date
renovate[bot]
e5590e5c4b
chore(deps): update dependency hapi to v17.4.0 (#1009) 2018-05-11 15:53:05 -07:00
Renovate Bot
0fb310f155
chore(deps): update dependency koa to v2.5.1 2018-05-11 15:53:05 -07:00
Renovate Bot
275057343b
chore(deps): update dependency @types/aws-lambda to v8.10.3 2018-05-11 15:53:05 -07:00
Brian Dennis
11aa855d43
docs: Fix typo in lambda package README (#999) 2018-05-11 15:53:04 -07:00
Renovate Bot
bd80dd194d
chore(deps): update dependency @adonisjs/bodyparser to v2.0.3 2018-05-11 15:53:04 -07:00
Jesse Rosenberger
9ab4f9d0f8
Merge pull request #942 from apollographql/docs-overhaul
[Work in Progress] 2.0 Documentation
2018-05-02 17:41:48 -07:00
Renovate Bot
3815aa63cf chore(deps): update dependency @types/koa-router to v7.0.28 2018-04-25 09:46:24 +00:00
Renovate Bot
d8fecdc5c8 chore(deps): update dependency @types/body-parser to v1.17.0 2018-04-25 08:02:19 +00:00
Renovate Bot
363171bff2 chore(deps): update dependency @types/aws-lambda to v8.10.2 2018-04-25 06:52:23 +00:00
David Glasser
b32e89c060 v1.3.6 2018-04-24 11:35:14 -07:00
Jesse Rosenberger
b2fa5d0c7d
Merge branch 'master' into docs-overhaul 2018-04-24 16:59:22 +03:00
David Glasser
e2df79d06c core: return PersistedQueryNotSupported for Apollo Persisted Queries (#982)
Apollo Persisted Queries is a standard for sending queries as short hashes
instead of full strings, designed to work well with GET requests. It is
implemented by servers including the Apollo Engine Proxy, and by the
apollo-link-persisted-query client.

A common configuration is to set up persisted queries on production servers but
not in development. It is still convenient to leave apollo-link-persisted-query
always on, though. While apollo-link-persisted-query can detect that servers
don't support PQs, it works better if the server actually says it doesn't
support the PQ, instead of trying to process a request without a query and
potentially printing a confusing stack trace.  This commit makes apollo-server
directly return PersistedQueryNotSupported instead of allowing confusing stack
traces to occur.
2018-04-24 06:29:07 -04:00
Jesse Rosenberger
c65b7a57bf
Merge remote-tracking branch 'origin/master' into docs-overhaul 2018-04-23 15:28:29 +03:00
Jesse Rosenberger
70c1d79a64
Bash syntax highlighting to just "Shell". 2018-04-20 19:34:35 +03:00
Renovate Bot
591b0f2cae chore(deps): update dependency typescript to v2.8.3 2018-04-20 10:02:15 +00:00
Jesse Rosenberger
9d0e7b6866
v1.3.5 2018-04-18 16:10:04 +03:00
David Glasser
cbb2b22570 core: fix HttpQueryRequest typing (#834)
This field generally gets used in `any` contexts, so the error didn't cause any compilation failures.
2018-04-18 16:00:44 +03:00
Steve Rice
083a1ee60e Avoid TypeError when querystring is present, but query missing (#964)
The express-graphql reference implementation [provides a check]
(2e27a73358/src/index.js (L201-L208))
to protect against cases where a GET request is made that does not
have a `query` parameter where the GraphQL query would be present.

Without this guard, graphql-js's `parse` will return `undefined`
for the `DocumentNode` since it has no document to read. Subsequently
passing this to `isQueryOperation` results in a `TypeError`, because
we are providing `undefined` where `getOperationAst` [expects to get
a DocumentNode](5fe39262a3/src/utilities/getOperationAST.js (L19)).

A new test file is added for `runHttpQuery`, as one previously did
not seem to exist.
2018-04-18 15:38:57 +03:00
Jesse Rosenberger
0a103ef5bd
Stop violating types by returning assertions from Mocha tests. (#972)
This change was introduced by the changes in apollographql/apollo-server#802
but first showed its head in apollographql/apollo-server#908.  The reason that
violations in new type definitions aren't being found until subsequent PRs
isn't entirely clear but, ignoring that CI-related annoyance, the problem
itself here is very concrete.

It traces back to a major version update to `@types/mocha` via [Exhibit A],
which makes it unacceptable to return anything besides a `Promise` or
_nothing_ from a Mocha test factory.

I agree with this change in principle, since generally speaking there can be
multiple `expect` statements in each test and there is no particular reason
that the last one's value should be getting returned as Mocha doesn't do
anything functional with it.

More than anything, this seems like an artifact of an ESLint rule which
mandated that the last value in a function be returned, à la CoffeeScript or
other languages.

This will fix the failing tests on apollographql/apollo-server#908 and other
PRs currently in-flight.

Exhibit A: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24301
2018-04-18 15:37:47 +03:00
Jesse Rosenberger
4cbaf4652d
Prettier for one change in #919. 2018-04-18 15:18:30 +03:00
renovate[bot]
0b235db2a3 chore(deps): update dependency @types/aws-lambda to v8 (#961) 2018-04-18 14:23:21 +03:00
Jamie Talbot
f387a1c824 Tighter context typing for GraphQLServerOptions (#919) 2018-04-18 14:16:45 +03:00
Jesse Rosenberger
f8ca710279 Use named arrow functions for all middlewares, including GraphiQL.
As originally reported in [0], this should make debugging performance issues
easier, since the name of the function will be properly displayed/shown in
flame-graphs.

[0]: https://github.com/apollographql/apollo-server/pull/827
2018-04-18 10:41:04 +03:00
Olivier Tassinari
e5e543b125 Use a named function for the middleware over an anonymous
It's making the investigation of performance issues easier.
2018-04-18 10:41:04 +03:00
Jelle Breuer
0261870eb7 adonis: Set Content-type to application/json on response (#842)
* Set Content_Type to application/json on response

* Added changelog entry

* fixed styling
2018-04-17 21:49:26 +03:00
Michael Golfi
3dc9719268 Azure Functions now returns correct response body (#753)
* Added fixes to apolloAzureFunctions.js and sample functions for the GraphQL API and GraphiQL

* Added issue and pr details to changelog

* Maintain use of `context.done()`, but use `isRaw` instead.

Per the Azure documentation regarding the response object available at:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node#response-object

* Switch Azure example to use CommonJS rather than native ESM exports.
2018-04-17 21:39:06 +03:00
Renovate Bot
38be32b4fc chore(deps): update dependency @types/connect to v3.4.32 2018-04-17 07:21:05 +00:00
Jesse Rosenberger
b8ab085aff
Add comment in code about reasoning behind #921.
It's probably helpful for posterity to leave some additional color in
the code to avoid the possibilit of someone inadvertently changing it
without considering the indirect possibilities.

cc @daffl (thanks!)

Ref: https://github.com/apollographql/apollo-server/pull/921
Ref: https://github.com/expressjs/express/issues/3473
2018-04-11 12:18:12 +03:00
David Luecke
ff154828e7 Import Restify dynamically in tests (#921) 2018-04-11 12:11:28 +03:00
Jonathan Jalouzot
afe5df4b4b FIX: Incorrect Content-Type for apollo-server-adonis (#910)
* FIX: Incorrect Content-Type for apollo-server-adonis

* feat: use response.type rather response.header

* Update CHANGELOG.md
2018-04-11 11:46:07 +03:00
Jesse Rosenberger
c2bba6b867
Convert Buffer.byteLength to string before assigning to Content-Length. (#956)
This change seems necessary in order to meet the new type definitions for
`res.setHeader` which mandate that the argument be a string, or an array of
strings.  Those type definitions were introduced via the `@types/node@9`
series of typing updates provided in [0], [1], [2].

With any luck, this will fix the failures being exhibited in CircleCI
tests[3] after we landed those typing updates.

[0]: https://github.com/apollographql/apollo-server/pull/907
[1]: https://github.com/apollographql/apollo-server/pull/927
[2]: https://github.com/apollographql/apollo-server/pull/939
[3]: https://circleci.com/gh/apollographql/apollo-server/1587
2018-04-11 11:17:55 +03:00
Renovate Bot
a546cde881 chore(deps): update dependency @types/koa to v2.0.45 2018-04-08 05:01:33 +00:00
Renovate Bot
cb8d763c1d chore(deps): update dependency @types/aws-lambda to v0.0.35 2018-04-07 06:37:48 +00:00
Renovate Bot
fb0e4332fd chore(deps): update dependency @adonisjs/fold to v4.0.8 2018-04-05 06:36:37 +00:00
Renovate Bot
84f93b201f chore(deps): update dependency hapi to v17.3.1 2018-04-03 06:52:51 +00:00
Renovate Bot
06451b198d chore(deps): update dependency hapi to v17.3.0 2018-03-31 07:01:32 +00:00
David Glasser
d4751e2f04 Update status badges for Circle correctly 2018-03-28 14:03:32 -07:00
David Glasser
80bce88b5b Update status badges for Circle 2018-03-28 14:01:46 -07:00
David Glasser
bd2504e04b v1.3.4 2018-03-28 13:57:11 -07:00
David Glasser
7d1165f1e0
All: allow cacheControl: {defaultMaxAge: 5}. (#922) 2018-03-28 13:56:22 -07:00
Renovate Bot
ebf892f8cc chore(deps): update dependency typescript to v2.8.1 2018-03-28 09:01:57 +00:00
Renovate Bot
273d5349b4 chore(deps): update dependency @types/graphql to v0.12.7 2018-03-28 07:03:40 +00:00
David Glasser
0f7c1c53b4
Update CHANGELOG for all releases back to v1.1.3 (#915)
There were many missing releases and bullet points as well as inaccurate
ones. For example, it was impossible to figure out that users of Hapi 16 who
want to use Apollo Cache Control needed to use precisely version 1.2.0 of
apollo-server-hapi (which wasn't even mentioned).

Link to CHANGELOG from all READMEs. Add READMEs for the graphql-server-*
packages. Add an explanation of our versioning system to the top of
CHANGELOG.md.
2018-03-27 09:22:13 -07:00
Jesse Rosenberger
19d04ff7f7
v1.3.3 2018-03-26 17:20:44 +03:00
Dan Dean
279054cd99 GRAPHIQL_VERSION 0.11.2 → 0.11.11
This just bumps the version of of GraphiQL to the latest bugfix release.
2018-03-26 15:40:09 +03:00
Renovate Bot
a4e2e3e893 chore(deps): update dependency @types/graphql to v0.12.6 2018-03-23 07:02:17 +00:00
Renovate Bot
abb946a123 chore(deps): update dependency @types/aws-lambda to v0.0.34 2018-03-23 06:48:37 +00:00
Renovate Bot
01c6bce7e8 chore(deps): update dependency hapi to v17.2.3 2018-03-16 13:13:56 +00:00
renovate[bot]
5eae20e92f chore(deps): update dependency @types/graphql to v0.12.5 (#887) 2018-03-16 14:06:15 +02:00
Lukwago Allan
c9a372839d Re-export out GraphQLOptions in apollo-server-express (#871)
* Export `GraphQLOptions` type directly from `apollo-server-express`.

Directly export `GraphQLOptions` from the `apollo-server-express` (and
synonymously, `graphql-server-express`) main module, rather than exporting
it only from `./expressApollo`.
2018-03-16 12:48:40 +02:00