Commit graph

34 commits

Author SHA1 Message Date
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
C. T. Lin
8c8729f066 fix README badge links and test imports (#1281) 2018-07-03 10:32:02 -07:00
Alessio Dionisi
bb4f1c3a36 Apollo Server 2.0: AWS Lambda Integration (#1188)
* initial implementation of aws lambda integration for apollo server 2

* ApolloServer class

* package.json cleanup

* parse json of body

* createHandler function, complete README

* cors options

* update readme

* lambdaApollo tests

* fix tests
2018-06-21 13:54:53 -07:00
Evans Hauser
cba05d9567
remove operation store module because of apq's 2018-06-15 11:16:37 -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
9d853f4be4 move ApolloServer tests into integration tests from core 2018-06-14 11:57:30 -07:00
David Glasser
40f9a4982f Remove packages for frameworks that don't yet support 2.0
Previously, we were planning to offer two kinds of APIs in "Apollo Server 2":
middleware functions just like in 1.0, and the new ApolloServer class.  We have
not yet implemented ApolloServer for all of our supported web frameworks, so
this meant that the 2.0 version of modules such as apollo-server-koa (which does
not yet have an ApolloServer class) offered very little benefits over
apollo-server-koa@1.0 (as most of the benefits of 2.0 come from ApolloServer).

This is confusing. We are going to improve the current registerServer API so
that there's no real benefit to using a separately-exported middleware directly
rather than creating an ApolloServer and applying it to your web framework. So
the AS 2.0 API will just be ApolloServer.  This means it doesn't make sense for
us to publish 2.x versions of the packages that don't yet support this API.

So this commit removes support for the following web frameworks: Adonis, Azure
Functions, Koa, Lambda, Micro, and Restify. (We leave in place Express, Hapi,
and Cloudflare workers.)

This isn't because we don't like these frameworks and don't want them to work
with Apollo Server 2.0!  We would love to see each package resurrected and an
ApolloServer implementation built, either during this current 2.x beta phase or
after the official 2.0 release. Deleting these packages for now makes it more
clear which frameworks support 2.0 and which don't, rather than existing in a
state where apollo-server-express@2 has ApolloServer and apollo-server-koa@2
does not.
2018-06-13 13:45:10 -07:00
Evans Hauser
cc5f81f559
tests: add apollo-server{,-express} tests to main test runner 2018-05-23 23:09:50 -07:00
Evans Hauser
ee7c99b908
tests: fix unhandled rejection log in test runner 2018-05-21 20:42:07 -07:00
Evans Hauser
373522114f
apollo-server-core: add tests for ApolloServerBase basic functionality 2018-05-20 02:32:09 -07:00
Evans Hauser
8fd2c12b8f
apollo-server-core: add test for errors 2018-05-16 16:03:09 -07: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
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
Alessandro Segala
037c13e5f3 Update to Hapi 17 (#687)
Note: TS typings for Hapi 17 are not available yet, so the types packages have been temporarily removed
2017-12-08 09:04:12 +01:00
Evgeni Razumov
10bf6433aa Add support for Adonis framework (#676) 2017-12-04 10:44:17 +01:00
Ulrik Strid
814db561fa Azure Functions bindings (#503) 2017-08-15 09:59:29 +02:00
Martijn Walraven
300c0cd12b Rename packages from graphql-server- to apollo-server- (#465) 2017-07-17 16:29:40 -07:00
Hagai Cohen
56c346e296 fix(graphql-server-core): validation for get queries 2017-06-12 22:30:49 -07:00
Hagai Cohen
ece5f30da2 Update dependencies (#350)
* Update dependencies
* chore(package): fix changelog
* chore(tests): disable tests for koa over node 6
* update changelog
2017-04-08 17:03:40 -07:00
Nick Nance
45aa44f08e Zeit micro support (#347)
* micro is only supported in node 6 or greater
* update dependencies
* working Graphiql Server
* updated changelog
* fix linting errors
* adding micro to test suite
* added micro example
2017-04-08 14:17:49 -07:00
Reyad Attiyat
7cd69251b6 Disable Koa integration test for NodeJS v4
Newer versions of Koa use features of ES6 that are not supported in
nodejs v4. This commits enables the Koa integration test only when run
on nodejs v6 or newer.
2017-03-19 23:02:16 -05:00
Reyad Attiyat
236dc25622 Add support for AWS Lambda
Create an integration that will return a lambda handler for a
graphql or graphiql server. This integration requires an API
Gateway with Lambda Proxy Integration.

The test runner expects req and res objects for testing. We
have to mock these for the tests to execute properly.
2017-01-30 16:58:16 -06:00
Hagai Cohen
571bba5a88 test(pacakge): remove source-map-support require which looks redundant 2017-01-25 02:05:34 +02:00
Hagai Cohen
bf55ab66b0 chore(package): remove babel 2017-01-25 02:05:24 +02:00
Joel Griffith
30a98ab310 Fixes for Restify packages, test updates, README 2017-01-23 09:43:58 -08:00
Joel Griffith
d456ff5b2b Adding in restify integration, docs, tests more... 2016-10-24 11:04:18 -07:00
Hagai Cohen
8df3383ece chore(package): rename apollo-server to graphql-server
Closes #163
2016-10-18 09:36:07 +03:00
Hagai Cohen
0c3ba91964 chore(monorepo): refactor files locations and reference 2016-10-18 09:14:32 +03:00
Jonas Helfer
d19f31331d initial attempt at core refactor with typescript 2016-06-10 17:05:39 -07:00
Rainer Dreyer
c3bdbf59ee Attaches connectors to mocked schema (#12)
Attaches connectors even if schema is (partially) mocked. Adds tests.
2016-05-31 15:17:28 -07:00
Nick Nance
292ec8e674 Apply Resolvers to JS schema (#10)
* working resolvers for js schemas

* remove mock from js schema test

* add test for js schema with mocks
2016-05-27 16:32:34 -07:00
Rainer Dreyer
a056dd2fb1 Allows resolvers to be used with mocks (#9)
Previously mocks would overwrite any resolvers, now they are only used when there is no resolve function.
2016-05-26 10:29:25 -07:00
Jonas Helfer
89da132450 merge in tracer changes from graphql-tools manually 2016-05-25 17:51:21 -07:00
Jonas Helfer
3695319d36 copying apolloServer over from graphql-tools 2016-04-24 15:55:22 -07:00