Evans Hauser
f118ed4b9c
apollo-server-core: add note about mutation on GET request ad-hoc error
2018-05-24 16:41:56 -07:00
Evans Hauser
8c92c1a7d8
integration-testsuite: add error on AST passed to server as query
2018-05-24 16:38:37 -07:00
Evans Hauser
220d2ed102
apollo-server-core: move query presence check to after formatParams
2018-05-24 16:18:57 -07:00
David Glasser
8b6b0161d1
Be consistent about where GraphQL queries are parsed
...
runQuery currently takes a `query` argument that is either a string or a
DocumentNode. This means that it's possible to accidentally support syntax we
don't mean to. For example, if you happen to send a JSON-serialized DocumentNode
over the wire, we'll happily execute that, and you'll believe you're using
GraphQL even though you really aren't --- until you try to use some other
GraphQL tool that expects to see the GraphQL query language rather than
graphql-js ASTs.
Additionally, GET requests parse their queries in runHttpQuery rather than
runQuery, leading to inconsistent error handling semantics on parse failures.
Simplify the runQuery API (which is technically exported though intended to be
mostly internal) to take in either a parsedQuery or a queryString argument. The
main use case for knowing about these parameters is if you're using formatParams
with OperationStore; its docs and tests have been updated to reflect this.
Stop parsing queries in runHttpQuery; instead, ensure we throw the right error
for mutations-over-GET by passing the error to throw into runQuery.
Stop accidentally supporting graphql-js ASTs on the wire --- but throw an
informative error when you do so.
This backwards-incompatible change is intended for apollo-server-core 2.0.
2018-05-24 15:47:09 -07:00
Evans Hauser
43d545f8ab
apollo-server-core: add request object to runHttpQuery for access to headers ( #1096 )
2018-05-24 15:43:17 -07:00
Evans Hauser
b4bad697b5
Merge pull request #1095 from apollographql/server-2.0/testing
...
Basic apollo-server and express integration tests
2018-05-24 14:32:19 -07:00
Evans Hauser
5b98a075b8
apollo-server-express: move import of apollo-server in tests to a require
2018-05-24 14:27:06 -07:00
Evans Hauser
9342658ac8
apollo-server-express: remove circular devDependeny on apollo-server for tests
2018-05-24 14:14:36 -07:00
Renovate Bot
51c9393246
chore(deps): update dependency sinon to v5.0.10
2018-05-24 10:02:19 +00:00
Renovate Bot
ce8ce58a8c
chore(deps): update dependency sinon to v5.0.9
2018-05-24 07:37:45 +00:00
Evans Hauser
cc5f81f559
tests: add apollo-server{,-express} tests to main test runner
2018-05-23 23:09:50 -07:00
Evans Hauser
f1fa8ade8a
apollo-server-express: tests constructor, registerServer options, and basic queries
2018-05-23 23:09:17 -07:00
Evans Hauser
3acb7c706a
apollo-server: tests constructor and basic queries
2018-05-23 23:08:47 -07:00
Renovate Bot
8ddfa741a3
chore(deps): update dependency @types/aws-lambda to v8.10.5
2018-05-24 06:02:02 +00:00
Evans Hauser
6b94408924
apollo-server: remove registerServer config from listen ( #1090 )
2018-05-23 21:55:02 -07:00
Evans Hauser
45d3614f1e
Merge pull request #1086 from apollographql/server-2.0/healthcheck-in-variants
...
Move health check into the server variants
2018-05-23 09:18:51 -07:00
Renovate Bot
f6fd3b2231
chore(deps): update dependency meteor-theme-hexo to v1.0.10
2018-05-23 13:02:39 +00:00
Evans Hauser
06a4bcbab1
apollo-server: add cors options to listen function
2018-05-22 22:05:46 -07:00
Evans Hauser
1f784636d9
apollo-server: move health check into variant's registerServer call
2018-05-22 21:58:37 -07:00
Evans Hauser
69be8c8429
apollo-server-hapi: add cors option to registerServer ( #1085 )
2018-05-22 21:25:52 -07:00
Evans Hauser
533efed9ce
Merge pull request #1084 from apollographql/server-2.0/api-docs
...
Docs: Api reference for base server and dead links/context creation
2018-05-22 17:53:31 -07:00
Evans Hauser
a1084059c7
docs: add code snippet example to context api reference
2018-05-22 17:47:48 -07:00
Evans Hauser
d84061b148
docs: remove old way of adding schema directives
2018-05-22 17:39:37 -07:00
Evans Hauser
531162c693
docs: fix dead links
2018-05-22 17:39:19 -07:00
Evans Hauser
20a41163c1
docs: remove dead links from essentials data and fix context creation
2018-05-22 17:38:41 -07:00
Evans Hauser
5577f54577
docs: flesh out api documentation for apollo-server
2018-05-22 17:14:52 -07:00
Evans Hauser
e604cfcb9c
docs: add pointer to apollo server 2 documentation ( #1083 )
2018-05-22 16:01:01 -07:00
Evans Hauser
712a562858
package.json: beta.2 for apollo-server, beta.1 for core/express, beta.0 for hapi
2018-05-22 11:16:59 -07:00
Evans Hauser
f04b76f809
apollo-server-hapi: add options parameter to create a server ( #1082 )
2018-05-22 10:08:15 -07:00
Evans Hauser
dccb482108
Merge pull request #1080 from apollographql/server-2.0/http-option
...
apollo-server-core: move http options under own key in listenOptions
2018-05-22 08:47:47 -07:00
Renovate Bot
fc48a29424
chore(deps): update dependency hapi to v17.5.0
2018-05-22 09:20:49 +00:00
Evans Hauser
57328e2214
apollo-server-core: move http options under own key in listenOptions
2018-05-21 23:20:56 -07:00
Evans Hauser
c9eaae6567
Merge pull request #1074 from apollographql/server-2.0/testing
...
Add Tests for base server functionality and fix issues with errors + subscriptions
2018-05-21 23:16:11 -07:00
Evans Hauser
ee7c99b908
tests: fix unhandled rejection log in test runner
2018-05-21 20:42:07 -07:00
Evans Hauser
40d8879fa3
apollo-server-core: runHttpQuery accepts options function with arguments
2018-05-21 20:34:51 -07:00
David Glasser
ae3fc36da0
Update all apollo-server-core dependencies
2018-05-21 20:27:57 -07:00
Evans Hauser
d935e517e6
apollo-server-core: update graphql-tools
2018-05-21 20:21:58 -07:00
Renovate Bot
4d5adaa454
chore(deps): update dependency supertest to v3.1.0
2018-05-22 03:01:59 +00:00
Renovate Bot
b8ebaf13c6
chore(deps): update dependency mocha to v5.2.0
2018-05-22 01:15:36 +00:00
Renovate Bot
f71f071073
chore(deps): update dependency koa-bodyparser to v4.2.1
2018-05-22 00:03:09 +00:00
Evans Hauser
582698c09c
package.json: update @types/graphql
2018-05-21 16:54:46 -07:00
Evans Hauser
361b661abc
lerna: add hoist option
2018-05-21 16:17:17 -07:00
Evans Hauser
2e9d4689b5
apollo-server-core: add comment about ApolloError construction
2018-05-21 16:08:32 -07:00
Evans Hauser
b568677a1c
apollo-server-azure-functions: add @types/node
2018-05-21 16:06:52 -07:00
Renovate Bot
c7cca123e2
chore(deps): update dependency body-parser to v1.18.3
2018-05-21 23:02:04 +00:00
Evans Hauser
23f5b76f10
apollo-server-core: ApolloError extends Error and implements GraphQLError
2018-05-21 15:41:36 -07:00
Evans Hauser
aea7c4e669
apollo-server-core: fix test after update typings to node 10
2018-05-21 15:37:58 -07:00
Evans Hauser
4f009777ba
apollo-server-core: fix typings on operation ast check for null ast
2018-05-21 15:33:10 -07:00
Evans Hauser
84e763358e
package.json: remove node and graphql types from root and unnecessary variants
2018-05-21 15:31:57 -07:00
Evans Hauser
072aef410b
tsconfig: remove typeRoots from tsconfig and automatic retreival of node types
2018-05-21 15:29:37 -07:00