Commit graph

59 commits

Author SHA1 Message Date
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
Jamie Talbot
f387a1c824 Tighter context typing for GraphQLServerOptions (#919) 2018-04-18 14:16:45 +03: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
Renovate Bot
a4e2e3e893 chore(deps): update dependency @types/graphql to v0.12.6 2018-03-23 07:02:17 +00:00
renovate[bot]
5eae20e92f chore(deps): update dependency @types/graphql to v0.12.5 (#887) 2018-03-16 14:06:15 +02:00
Renovate Bot
d50b6b6fb2 chore(deps): update dependency graphql to v0.13.1 2018-03-13 16:01:14 +00:00
Sashko Stubailo
281392c3f0 Update to graphql@0.12 (#726)
* Update peer deps and tests for 0.12
* v1.3.2
2018-03-13 17:10:37 +02:00
Marvin Hagemeister
9e8984c2ee Inline all possible functions that are used only once (#821)
* Inline isFunction type-guard

* Don't redefine functions on doRunQuery

* Update CHANGELOG
2018-03-12 21:25:12 +02:00
Renovate Bot
15202a7f4b chore(deps): update dependency typescript to v2.7.2 2018-02-16 08:00:58 +00:00
Renovate Bot
a2ebf00cb4 chore(deps): update dependency typescript to v2.7.1 2018-02-01 08:01:38 +00:00
Renovate Bot
b370a0c3c3 chore(deps): update dependency @types/fibers to v0.0.30 2018-01-19 10:01:21 +00:00
Laurin Quast
df51fd90da Setup prettier (#724)
* Setup prettier and precommit hooks

* Format code with prettier

* Use husky because it works...

* Move prettier config to .prettierrc file

* Implement fixing markdown file formatting when running lint-fix script

* Format markdown files

* Add .json file formatting

* Fixes json file formatting

* Add pretteir linting step

* Remove tslint

* Use gitignore for prettier

* Fix linting errors

* Ignore submodule folder
2018-01-08 15:08:01 -08:00
Dom Armstrong
a8ae9042f5 Fix apollo-server-core runQuery breaks async_hook tracking (#733)
By creating a promise out of the execution flow the ability to trace the
async call stack is lost.
2017-12-22 05:46:02 +01:00
Martijn Walraven
6685ecb458 v1.3.1 2017-12-18 07:34:48 +01:00
Martijn Walraven
4b8f3b258e Fix execution with graphql-js 0.12.x
This fixes executing a query if all fields it encounters have synchronous resolvers, for which behavior changed in 0.12.x due to graphql/graphql-js#1115.

Closes #718, closes #720
2017-12-18 07:24:33 +01:00
Renovate Bot
0c439cb35f chore(deps): update dependency @types/graphql to v0.11.7 2017-12-12 20:31:42 +00:00
Martijn Walraven
9ba34306ed v1.3.0 2017-12-12 09:45:49 +01:00
Sashko Stubailo
93f052352c
Docs improvements (#692)
* Freshen up title page

* Improve homepage further

* File a PR!

* Try adding express README to sidebar

* Add READMEs to docs

* Add example page, overhaul setup

* More stuff

* Fix all old URLs

* Eliminate all mentions of graphql-server

* Fix azure functions shit
2017-12-11 23:11:11 -08:00
Benedict Hobart
62c397eecc Fix shallow cloning of context when executing a batch request (#679)
This fixes the default behavior for class-based contexts by also cloning the prototype, and it allows you to customize per-operation behavior by passing in a function as context.
2017-12-12 08:09:01 +01:00
renovate[bot]
384bb87234 chore(deps): pin dependencies 2017-12-11 19:19:07 +00:00
Evgeni Razumov
10bf6433aa Add support for Adonis framework (#676) 2017-12-04 10:44:17 +01:00
Martijn Walraven
3fecfcd321 v1.2.0 2017-10-24 09:14:51 -07:00
Martijn Walraven
65a642506d v1.2.0-pre.1 2017-10-24 09:09:08 -07:00
Martijn Walraven
818ddfa3bd Add support for Apollo Cache Control 2017-10-24 09:09:08 -07:00
Nick Nance
47335f726d include readme for npm packages 2017-10-23 15:13:31 -07:00
Martijn Walraven
f5376afadf v1.1.7 2017-10-16 07:59:23 -07:00
Martijn Walraven
cea758e3fe Change apollo-tracing dependency to ^0.0.x
Fixes #616.
2017-10-16 07:55:40 -07:00
Martijn Walraven
0cf62cda51 v1.1.6 2017-10-09 21:12:08 +02:00
Martijn Walraven
92eea40203 v1.1.5 2017-10-09 20:34:10 +02:00
Martijn Walraven
912cd89546 Merge branch 'master' of https://github.com/apollographql/apollo-server 2017-10-09 20:30:34 +02:00
Martijn Walraven
20353d60c4 Revert "fix(deps): update dependency apollo-tracing to v^0.0.8 (#602)"
This reverts commit 42d00fb65b.
2017-10-09 20:30:17 +02:00
Martijn Walraven
9b8e9de2c4 v1.1.4 2017-10-09 20:21:29 +02:00
renovate[bot]
42d00fb65b fix(deps): update dependency apollo-tracing to v^0.0.8 (#602) 2017-10-09 20:20:14 +02:00
renovate[bot]
fd7973ff8d chore(deps): update dependency @types/graphql to v0.11.5 2017-10-06 08:03:31 +00:00
Martijn Walraven
eb6bb7f5dd v1.1.3 2017-10-05 06:46:38 +02:00
Martijn Walraven
b726f274eb Add graphql ^0.11.0 to peerDependencies and remove redundant peerDependencies from server packages
Fixes #529.
2017-10-02 13:39:31 +02:00
renovate[bot]
a62d25cbae chore(deps): update dependency @types/graphql to v0.11.4 2017-09-19 07:31:38 +00:00
renovate[bot]
4e302ef37c chore(deps): update dependency @types/graphql to v0.11.3 2017-09-12 07:33:13 +00:00
renovate[bot]
4efa1254a4 chore(deps): update dependency @types/graphql to v0.11.1 2017-09-07 07:32:06 +00:00
renovate[bot]
6b0ca0a2e5 chore(deps): update dependency @types/graphql to v0.11.0 2017-09-04 10:29:21 +00:00