Skip to content

Commit

Permalink
run lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Evans Hauser committed Jul 13, 2018
1 parent c2ebc02 commit d7de417
Show file tree
Hide file tree
Showing 17 changed files with 270 additions and 268 deletions.
236 changes: 118 additions & 118 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Oh, and if you haven't already, sign up for the [Apollo Slack](https://www.apoll

Here are some ways to contribute to the project, from easiest to most difficult:

* [Reporting bugs](#reporting-bugs)
* [Improving the documentation](#improving-the-documentation)
* [Responding to issues](#responding-to-issues)
* [Small bug fixes](#small-bug-fixes)
* [Suggesting features](#suggesting-features)
* [Big pull requests](#big-prs)
- [Reporting bugs](#reporting-bugs)
- [Improving the documentation](#improving-the-documentation)
- [Responding to issues](#responding-to-issues)
- [Small bug fixes](#small-bug-fixes)
- [Suggesting features](#suggesting-features)
- [Big pull requests](#big-prs)

## Issues

Expand Down Expand Up @@ -57,8 +57,8 @@ Once there is a consensus on the need for a new feature, proceed as listed below

This includes:

* Big bug fixes
* New features
- Big bug fixes
- New features

For significant changes to a repository, it’s important to settle on a design before starting on the implementation. This way, we can make sure that major improvements get the care and attention they deserve. Since big changes can be risky and might not always get merged, it’s good to reduce the amount of possible wasted effort by agreeing on an implementation design/plan first.

Expand Down
12 changes: 6 additions & 6 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ The main goals of GraphQL Server are (in order of priority):

GraphQL Server should come with a set of integrations for different Node.js server frameworks:

* Express
* Hapi
* Connect
* Koa
* Restify
* ...
- Express
- Hapi
- Connect
- Koa
- Restify
- ...

Framework integrations take care of parsing requests, submitting them to GraphQL Server’s core runQuery function, and sending the response back to the client. These integrations should accept requests over HTTP, websockets or other means, then invoke `runQuery` as appropriate, and return the result. They should be written in such a way that makes it easy to add features, such as batched queries, subscriptions etc.

Expand Down
66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Apollo Server is a community-maintained open-source GraphQL server. It works wit

Apollo Server is built with the following principles in mind:

* **By the community, for the community**: Apollo Server's development is driven by the needs of developers
* **Simplicity**: by keeping things simple, Apollo Server is easier to use, easier to contribute to, and more secure
* **Performance**: Apollo Server is well-tested and production-ready - no modifications needed
- **By the community, for the community**: Apollo Server's development is driven by the needs of developers
- **Simplicity**: by keeping things simple, Apollo Server is easier to use, easier to contribute to, and more secure
- **Performance**: Apollo Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](./CONTRIBUTING.md), take a look at the [roadmap](./ROADMAP.md) and make your first PR!

Expand All @@ -32,14 +32,14 @@ Just run `npm install --save apollo-server-<variant>` and you're good to go!

where `<variant>` is one of the following:

* `express`
* `koa`
* `hapi`
* `restify`
* `lambda`
* `micro`
* `azure-functions`
* `adonis`
- `express`
- `koa`
- `hapi`
- `restify`
- `lambda`
- `micro`
- `azure-functions`
- `adonis`

### Express

Expand Down Expand Up @@ -210,19 +210,19 @@ Route.get('/graphql', graphqlAdonis({ schema: myGraphQLSchema }));

Apollo Server can be configured with an options object with the following fields:

* **schema**: the GraphQLSchema to be used
* **context**: the context value passed to resolvers during GraphQL execution
* **rootValue**: the value passed to the first resolve function
* **formatError**: a function to apply to every error before sending the response to clients
* **skipValidation**: skip query validation (increase performance, use carefully, only with whitelisting)
* **validationRules**: additional GraphQL validation rules to be applied to client-specified queries
* **formatParams**: a function applied for each query in a batch to format parameters before execution
* **formatResponse**: a function applied to each response after execution
* **tracing**: when set to true, collect and expose trace data in the [Apollo Tracing format](https://github.com/apollographql/apollo-tracing)
* **logFunction**: a function called for logging events such as execution times
* **fieldResolver**: a custom default field resolver
* **debug**: a boolean that will print additional debug logging if execution errors occur
* **cacheControl**: when set to true, enable built-in support for Apollo Cache Control
- **schema**: the GraphQLSchema to be used
- **context**: the context value passed to resolvers during GraphQL execution
- **rootValue**: the value passed to the first resolve function
- **formatError**: a function to apply to every error before sending the response to clients
- **skipValidation**: skip query validation (increase performance, use carefully, only with whitelisting)
- **validationRules**: additional GraphQL validation rules to be applied to client-specified queries
- **formatParams**: a function applied for each query in a batch to format parameters before execution
- **formatResponse**: a function applied to each response after execution
- **tracing**: when set to true, collect and expose trace data in the [Apollo Tracing format](https://github.com/apollographql/apollo-tracing)
- **logFunction**: a function called for logging events such as execution times
- **fieldResolver**: a custom default field resolver
- **debug**: a boolean that will print additional debug logging if execution errors occur
- **cacheControl**: when set to true, enable built-in support for Apollo Cache Control

All options except for `schema` are optional.

Expand All @@ -248,12 +248,12 @@ graphqlOptions = {

Both Apollo Server and [`express-graphql`](https://github.com/graphql/express-graphql) are GraphQL servers for Node.js, built on top of the [`graphql-js` reference implementation](https://github.com/graphql/graphql-js), but there are a few key differences:

* `express-graphql` works with Express and Connect, Apollo Server supports Express, Connect, Hapi, Koa and Restify.
* Compared to `express-graphql`, Apollo Server has a simpler interface and supports exactly one way of passing queries.
* Apollo Server separates serving [GraphiQL](https://github.com/graphql/graphiql) (an in-browser IDE for exploring GraphQL) from responding to GraphQL requests.
* `express-graphql` contains code for parsing HTTP request bodies, Apollo Server leaves that to standard packages like body-parser.
* Apollo Server includes an `OperationStore` to easily manage whitelisting.
* Apollo Server is built with TypeScript.
- `express-graphql` works with Express and Connect, Apollo Server supports Express, Connect, Hapi, Koa and Restify.
- Compared to `express-graphql`, Apollo Server has a simpler interface and supports exactly one way of passing queries.
- Apollo Server separates serving [GraphiQL](https://github.com/graphql/graphiql) (an in-browser IDE for exploring GraphQL) from responding to GraphQL requests.
- `express-graphql` contains code for parsing HTTP request bodies, Apollo Server leaves that to standard packages like body-parser.
- Apollo Server includes an `OperationStore` to easily manage whitelisting.
- Apollo Server is built with TypeScript.

### application/graphql requests

Expand Down Expand Up @@ -286,9 +286,9 @@ express()

If you want to develop Apollo Server locally you must follow the following instructions:

* Fork this repository
- Fork this repository

* Install the Apollo Server project in your computer
- Install the Apollo Server project in your computer

```
git clone https://github.com/[your-user]/apollo-server
Expand All @@ -298,7 +298,7 @@ cd packages/apollo-server-<variant>/
npm link
```

* Install your local Apollo Server in other App
- Install your local Apollo Server in other App

```
cd ~/myApp
Expand Down
30 changes: 15 additions & 15 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ This document contains a rough outline of a roadmap and a few designs for future

### Completed

* Rewrite in TypeScript
* Simplification of API
* Express integration
* Query batching (Express)
* Query whitelisting / stored queries
* Hapi integration
* Koa integration
* Connect integration
* Complete rewrite of Apollo Server documentation
- Rewrite in TypeScript
- Simplification of API
- Express integration
- Query batching (Express)
- Query whitelisting / stored queries
- Hapi integration
- Koa integration
- Connect integration
- Complete rewrite of Apollo Server documentation

### Current

* Performance testing in production setting
- Performance testing in production setting

### Next up

* Better GraphQL error handling
* Support for simple query timeouts
* Websocket transport
* GraphQL subscriptions
- Better GraphQL error handling
- Support for simple query timeouts
- Websocket transport
- GraphQL subscriptions

### Future

* Support for @defer, @stream and @live directives
- Support for @defer, @stream and @live directives

## Proposed designs

Expand Down
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is the documentation **source** for this repository.

The **deployed** version of the documentation for this repository is available at:

* https://www.apollographql.com/docs/apollo-server/
- https://www.apollographql.com/docs/apollo-server/

## Documentation for the documentation

Expand All @@ -16,9 +16,9 @@ For more information, consult the documentation for the documentation, reference

In general though:

* `npm install` in this directory
* `npm start` in this directory
* Open a browser to the link provided in the console.
- `npm install` in this directory
- `npm start` in this directory
- Open a browser to the link provided in the console.

> **Important note:** Changes to the markdown source does not result in an automatic "hot reload" in the browser; it is necessary to reload the page manually in the browser to see it re-rendered. Additionally, changes to `_config.yml` require stopping the server and restarting with `npm start` again.
Expand Down
18 changes: 9 additions & 9 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ If you don't see your favorite server there, [file a PR](https://github.com/apol

At the end of the day, Apollo Server is a simple, production-ready solution without too many features. Here's what you can do with it:

* Attach a GraphQL schema to your HTTP server to serve requests
* Attach GraphQL and GraphiQL via separate middlewares, on different routes
* Accept queries via GET or POST
* Support HTTP query batching
* Support Apollo Tracing to get performance information about your server
* Support Apollo Cache Control to inform caching gateways such as Apollo Engine
- Attach a GraphQL schema to your HTTP server to serve requests
- Attach GraphQL and GraphiQL via separate middlewares, on different routes
- Accept queries via GET or POST
- Support HTTP query batching
- Support Apollo Tracing to get performance information about your server
- Support Apollo Cache Control to inform caching gateways such as Apollo Engine

<h2 id="principles">Principles</h2>

Apollo Server is built with the following principles in mind:

* **By the community, for the community**: Apollo Server's development is driven by the needs of developers using the library.
* **Simplicity**: Keeping things simple, for example supporting a limited set of transports, makes Apollo Server easier to use, easier to contribute to, and more secure.
* **Performance**: Apollo Server is well-tested and production-ready.
- **By the community, for the community**: Apollo Server's development is driven by the needs of developers using the library.
- **Simplicity**: Keeping things simple, for example supporting a limited set of transports, makes Apollo Server easier to use, easier to contribute to, and more secure.
- **Performance**: Apollo Server is well-tested and production-ready.

Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [issues](https://github.com/apollographql/apollo-server/issues) and make your first PR!
6 changes: 3 additions & 3 deletions docs/source/migration-hapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ description: How to migrate to Apollo Server 0.3 from 0.2.
Version 0.3.0 of Apollo Server contains a couple of breaking changes in the Hapi plugin API.
The most notable changes are:

* the plugin class has been replaced as a function to be more idiomatic
* the plugin name has been renamed to use camelcase
* the options object has been extended to support additional routing options
- the plugin class has been replaced as a function to be more idiomatic
- the plugin name has been renamed to use camelcase
- the options object has been extended to support additional routing options

The following code snippet for Hapi Apollo 0.2.x

Expand Down
14 changes: 7 additions & 7 deletions docs/source/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ description: How to migrate from an older version of Apollo Server
Version 0.2.0 of Apollo Server contains several breaking changes in the API.
The most notable changes are:

* the `apolloServer` function no longer exists and was replaced with `apolloExpress`.
* `apolloExpress` no longer accepts shorthand type definitions
* `apolloExpress` doesn't have the `resolvers`, `mocks` and `connectors` options.
* `apolloExpress` doesn't include GraphiQL any more
* `context`: if you use connectors in your schema, don't forget to setup default `context` to at least an empty object, it can't be `undefined` in this case
* Apollo Server no longer accepts GET requests or parameters in the URL
* `apolloExpress` no longer parses the HTTP body automatically
- the `apolloServer` function no longer exists and was replaced with `apolloExpress`.
- `apolloExpress` no longer accepts shorthand type definitions
- `apolloExpress` doesn't have the `resolvers`, `mocks` and `connectors` options.
- `apolloExpress` doesn't include GraphiQL any more
- `context`: if you use connectors in your schema, don't forget to setup default `context` to at least an empty object, it can't be `undefined` in this case
- Apollo Server no longer accepts GET requests or parameters in the URL
- `apolloExpress` no longer parses the HTTP body automatically

In order to make updating from an older version of Apollo Server easier, this guide
shows how to use `graphql-tools` together with `apolloExpress` and `graphiqlExpress` to
Expand Down
6 changes: 3 additions & 3 deletions docs/source/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ const GraphQLOptions = {

To see how to use the middleware with your particular JavaScript server, check out the docs for those:

* [Express / Connect](./servers/express.html)
* [Hapi](./servers/hapi.html)
* [Koa](./servers/koa.html)
- [Express / Connect](./servers/express.html)
- [Hapi](./servers/hapi.html)
- [Koa](./servers/koa.html)

And more are being added every day!
6 changes: 3 additions & 3 deletions packages/apollo-server-adonis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Route.get(

Apollo Server is built with the following principles in mind:

* **By the community, for the community**: Apollo Server's development is driven by the needs of developers
* **Simplicity**: by keeping things simple, Apollo Server is easier to use, easier to contribute to, and more secure
* **Performance**: Apollo Server is well-tested and production-ready - no modifications needed
- **By the community, for the community**: Apollo Server's development is driven by the needs of developers
- **Simplicity**: by keeping things simple, Apollo Server is easier to use, easier to contribute to, and more secure
- **Performance**: Apollo Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!
6 changes: 3 additions & 3 deletions packages/apollo-server-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ http.createServer(app).listen(PORT);

GraphQL Server is built with the following principles in mind:

* **By the community, for the community**: GraphQL Server's development is driven by the needs of developers
* **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure
* **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed
- **By the community, for the community**: GraphQL Server's development is driven by the needs of developers
- **Simplicity**: by keeping things simple, GraphQL Server is easier to use, easier to contribute to, and more secure
- **Performance**: GraphQL Server is well-tested and production-ready - no modifications needed

Anyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](https://github.com/apollographql/apollo-server/blob/master/CONTRIBUTING.md), take a look at the [roadmap](https://github.com/apollographql/apollo-server/blob/master/ROADMAP.md) and make your first PR!
Loading

0 comments on commit d7de417

Please sign in to comment.