Skip to content

Commit

Permalink
chore(package): rename apollo-server to graphql-server
Browse files Browse the repository at this point in the history
Closes #163
  • Loading branch information
DxCx committed Oct 18, 2016
1 parent 2219fb9 commit 8df3383
Show file tree
Hide file tree
Showing 48 changed files with 98 additions and 98 deletions.
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# GraphQL Server for Express, Connect, Hapi and Koa

[![npm version](https://badge.fury.io/js/apollo-server.svg)](https://badge.fury.io/js/apollo-server)
[![Build Status](https://travis-ci.org/apollostack/apollo-server.svg?branch=master)](https://travis-ci.org/apollostack/apollo-server)
[![Coverage Status](https://coveralls.io/repos/github/apollostack/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollostack/apollo-server?branch=master)
[![npm version](https://badge.fury.io/js/graphql-server.svg)](https://badge.fury.io/js/graphql-server)
[![Build Status](https://travis-ci.org/apollostack/graphql-server.svg?branch=master)](https://travis-ci.org/apollostack/graphql-server)
[![Coverage Status](https://coveralls.io/repos/github/apollostack/graphql-server/badge.svg?branch=master)](https://coveralls.io/github/apollostack/graphql-server?branch=master)
[![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](http://www.apollostack.com/#slack)

Apollo Server is a community-maintained open-source GraphQL server. It works with all Node.js HTTP server frameworks: Express, Connect, Hapi and Koa.
GraphQL Server is a community-maintained open-source GraphQL server. It works with all Node.js HTTP server frameworks: Express, Connect, Hapi and Koa.

## Principles

Apollo Server is built with the following principles in mind:
GraphQL 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**: 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 Apollo Server, just read [CONTRIBUTING.md](./CONTRIBUTING.md), take a look at the [roadmap](./ROADMAP.md) and make your first PR!
Anyone is welcome to contribute to GraphQL Server, just read [CONTRIBUTING.md](./CONTRIBUTING.md), take a look at the [roadmap](./ROADMAP.md) and make your first PR!


## Getting started

Apollo Server is super-easy to set up. Just npm-install apollo-server, write a GraphQL schema, and then use one of the following snippets to get started. For more info, read the [Apollo Server docs](http://dev.apollodata.com/tools/apollo-server/index.html).
GraphQL Server is super-easy to set up. Just npm-install graphql-server-<variant>, write a GraphQL schema, and then use one of the following snippets to get started. For more info, read the [GraphQL Server docs](http://dev.apollodata.com/tools/graphql-server/index.html).

### Installation

Just run `npm install --save apollo-server-<variant>` and you're good to go!
Just run `npm install --save graphql-server-<variant>` and you're good to go!

where variant is one of the following:
- express
Expand All @@ -36,7 +36,7 @@ where variant is one of the following:

```js
import express from 'express';
import { apolloExpress } from 'apollo-server-express';
import { apolloExpress } from 'graphql-server-express';

const myGraphQLSchema = // ... define or import your schema here!
const PORT = 3000;
Expand All @@ -52,7 +52,7 @@ app.listen(PORT);
```js
import connect from 'connect';
import bodyParser from 'body-parser';
import { apolloConnect } from 'apollo-server-express';
import { apolloConnect } from 'graphql-server-express';
import http from 'http';

const PORT = 3000;
Expand All @@ -71,7 +71,7 @@ Now with the Hapi plugins `apolloHapi` and `graphiqlHapi` you can pass a route o

```js
import hapi from 'hapi';
import { apolloHapi } from 'apollo-server-hapi';
import { apolloHapi } from 'graphql-server-hapi';

const server = new hapi.Server();

Expand Down Expand Up @@ -108,7 +108,7 @@ server.start((err) => {
```js
import koa from 'koa';
import koaRouter from 'koa-router';
import { apolloKoa } from 'apollo-server-koa';
import { apolloKoa } from 'graphql-server-koa';

const app = new koa();
const router = new koaRouter();
Expand All @@ -124,7 +124,7 @@ app.listen(PORT);

## Options

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

* **schema**: the GraphQLSchema to be used
* **context**: the context value passed to resolvers during GraphQL execution
Expand Down Expand Up @@ -154,39 +154,39 @@ apolloOptions = {

## Differences to express-graphql

Apollo Server and express-graphql are more or less the same thing (GraphQL middleware for Node.js), but there are a few key differences:
GraphQL Server and express-graphql are more or less the same thing (GraphQL middleware for Node.js), but there are a few key differences:

* express-graphql works with Express and Connect, Apollo Server supports Express, Connect, Hapi and Koa.
* express-graphql's main goal is to be a minimal reference implementation, whereas Apollo Server's goal is to be a complete production-ready GraphQL server.
* Compared to express-graphql, Apollo Server has a simpler interface and supports exactly one way of passing queries.
* Apollo Server separates serving GraphiQL (GraphQL UI) from responding to GraphQL requests.
* express-graphql contains code for parsing HTTP request bodies, Apollo Server leaves that to standard packages like body-parser.
* express-graphql works with Express and Connect, GraphQL Server supports Express, Connect, Hapi and Koa.
* express-graphql's main goal is to be a minimal reference implementation, whereas GraphQL Server's goal is to be a complete production-ready GraphQL server.
* Compared to express-graphql, GraphQL Server has a simpler interface and supports exactly one way of passing queries.
* GraphQL Server separates serving GraphiQL (GraphQL UI) from responding to GraphQL requests.
* express-graphql contains code for parsing HTTP request bodies, GraphQL Server leaves that to standard packages like body-parser.
* Includes an `OperationStore` to easily manage whitelisting
* Built with TypeScript

Despite express-graphql being a reference implementation, Apollo Server is actually easier to understand and more modular than express-graphql.
Despite express-graphql being a reference implementation, GraphQL Server is actually easier to understand and more modular than express-graphql.

That said, Apollo Server is heavily inspired by express-graphql (it's the reference implementation after all). Rather than seeing the two as competing alternatives, we think that they both have separate roles in the GraphQL ecosystem: express-graphql is a reference implementation, and Apollo Server is a GraphQL server to be used in production and evolve quickly with the needs of the community. Over time, express-graphql can adopt those features of Apollo Server that have proven their worth and become established more widely.
That said, GraphQL Server is heavily inspired by express-graphql (it's the reference implementation after all). Rather than seeing the two as competing alternatives, we think that they both have separate roles in the GraphQL ecosystem: express-graphql is a reference implementation, and GraphQL Server is a GraphQL server to be used in production and evolve quickly with the needs of the community. Over time, express-graphql can adopt those features of GraphQL Server that have proven their worth and become established more widely.

## Apollo Server Development
## GraphQL Server Development

If you want to develop apollo server locally you must follow the following instructions:

* Fork this repository

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

```
git clone https://github.com/[your-user]/apollo-server
cd apollo-server
git clone https://github.com/[your-user]/graphql-server
cd graphql-server
npm install
cd packages/apollo-server-<variant>/
cd packages/graphql-server-<variant>/
npm link
```

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

```
cd ~/myApp
npm link apollo-server
npm link graphql-server-<variant>
```
6 changes: 3 additions & 3 deletions integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An Express Middleware for the Apollo Server
import * as graphql from "graphql";
import * as express from "express";
import * as bodyParser from "body-parser";
import { graphqlHTTP, renderGraphiQL } from "apollo-server";
import { apolloExpress, graphiqlExpress } from "graphql-server-express";

const port = 3000;
const endpointURL = "/graphql";
Expand All @@ -24,8 +24,8 @@ const schema = new graphql.GraphQLSchema({
});

app.use(bodyParser.json());
app.get("/", renderGraphiQL({endpointURL}));
app.post(endpointURL, graphqlHTTP({schema}));
app.get("/", graphiqlExpress({endpointURL}));
app.post(endpointURL, apolloExpress({schema}));

app.listen(port, () => {
console.log(`Server is listen on ${port}`);
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"lerna": "2.0.0-beta.30",
"version": "0.3.2",
"changelog": {
"repo": "apollostack/apollo-server",
"repo": "apollostack/graphql-server",
"labels": {
"tag: spec compliancy": ":eyeglasses: Spec Compliancy",
"tag: breaking change": ":boom: Breaking Change",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/apollostack/apollo-server.git"
"url": "git+https://github.com/apollostack/graphql-server.git"
},
"scripts": {
"compile": "lerna exec -- npm run compile",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "apollo-server-core",
"name": "graphql-server-core",
"version": "0.3.2",
"description": "Core engine ffor Apollo GraphQL server",
"main": "dist/index.js",
Expand All @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/apollostack/apollo-server/tree/master/packages/apollo-server-core"
"url": "https://github.com/apollostack/graphql-server/tree/master/packages/graphql-server-core"
},
"keywords": [
"GraphQL",
Expand All @@ -20,9 +20,9 @@
"author": "Jonas Helfer <jonas@helfer.email>",
"license": "MIT",
"bugs": {
"url": "https://github.com/apollostack/apollo-server/issues"
"url": "https://github.com/apollostack/graphql-server/issues"
},
"homepage": "https://github.com/apollostack/apollo-server#readme",
"homepage": "https://github.com/apollostack/graphql-server#readme",
"dependencies": {},
"devDependencies": {
"@types/fibers": "0.0.29",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "apollo-server-express",
"name": "graphql-server-express",
"version": "0.3.2",
"description": "Production-ready Node.js GraphQL server for Express, Connect",
"main": "dist/index.js",
Expand All @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/apollostack/apollo-server/tree/master/packages/apollo-server-express"
"url": "https://github.com/apollostack/graphql-server/tree/master/packages/graphql-server-express"
},
"keywords": [
"GraphQL",
Expand All @@ -22,19 +22,19 @@
"author": "Jonas Helfer <jonas@helfer.email>",
"license": "MIT",
"bugs": {
"url": "https://github.com/apollostack/apollo-server/issues"
"url": "https://github.com/apollostack/graphql-server/issues"
},
"homepage": "https://github.com/apollostack/apollo-server#readme",
"homepage": "https://github.com/apollostack/graphql-server#readme",
"dependencies": {
"apollo-server-core": "^0.3.2",
"apollo-server-graphiql": "^0.3.2"
"graphql-server-core": "^0.3.2",
"graphql-server-module-graphiql": "^0.3.2"
},
"devDependencies": {
"@types/body-parser": "0.0.33",
"@types/connect": "^3.4.30",
"@types/express": "^4.0.33",
"@types/multer": "0.0.32",
"apollo-server-integration-testsuite": "^0.3.2",
"graphql-server-integration-testsuite": "^0.3.2",
"body-parser": "^1.15.2",
"connect": "^3.4.1",
"express": "^4.14.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as bodyParser from 'body-parser';
import { apolloConnect, graphiqlConnect } from './connectApollo';
import 'mocha';

import testSuite, { Schema, CreateAppOptions } from 'apollo-server-integration-testsuite';
import testSuite, { Schema, CreateAppOptions } from 'graphql-server-integration-testsuite';

function createConnectApp(options: CreateAppOptions = {}) {
const app = connect();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as express from 'express';
import * as bodyParser from 'body-parser';
import { apolloExpress, graphiqlExpress } from './expressApollo';
import testSuite, { Schema, CreateAppOptions } from 'apollo-server-integration-testsuite';
import testSuite, { Schema, CreateAppOptions } from 'graphql-server-integration-testsuite';
import { expect } from 'chai';
import { ApolloOptions } from 'apollo-server-core';
import { ApolloOptions } from 'graphql-server-core';
import 'mocha';

function createApp(options: CreateAppOptions = {}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as express from 'express';
import * as graphql from 'graphql';
import * as url from 'url';
import { ApolloOptions, runQuery } from 'apollo-server-core';
import * as GraphiQL from 'apollo-server-graphiql';
import { ApolloOptions, runQuery } from 'graphql-server-core';
import * as GraphiQL from 'graphql-server-module-graphiql';

export interface ExpressApolloOptionsFunction {
(req?: express.Request, res?: express.Response): ApolloOptions | Promise<ApolloOptions>;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "apollo-server-hapi",
"name": "graphql-server-hapi",
"version": "0.3.2",
"description": "Production-ready Node.js GraphQL server for Hapi",
"main": "dist/index.js",
Expand All @@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/apollostack/apollo-server/tree/master/packages/apollo-server-hapi"
"url": "https://github.com/apollostack/graphql-server/tree/master/packages/graphql-server-hapi"
},
"keywords": [
"GraphQL",
Expand All @@ -21,18 +21,18 @@
"author": "Jonas Helfer <jonas@helfer.email>",
"license": "MIT",
"bugs": {
"url": "https://github.com/apollostack/apollo-server/issues"
"url": "https://github.com/apollostack/graphql-server/issues"
},
"homepage": "https://github.com/apollostack/apollo-server#readme",
"homepage": "https://github.com/apollostack/graphql-server#readme",
"dependencies": {
"apollo-server-core": "^0.3.2",
"apollo-server-graphiql": "^0.3.2",
"graphql-server-core": "^0.3.2",
"graphql-server-module-graphiql": "^0.3.2",
"boom": "^4.0.0"
},
"devDependencies": {
"@types/boom": "0.0.32",
"@types/hapi": "^13.0.35",
"apollo-server-integration-testsuite": "^0.3.2",
"graphql-server-integration-testsuite": "^0.3.2",
"hapi": "^15.0.3",
"typed-graphql": "^1.0.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as hapi from 'hapi';
import { apolloHapi, graphiqlHapi, HapiPluginOptions } from './hapiApollo';
import 'mocha';

import testSuite, { Schema } from 'apollo-server-integration-testsuite';
import testSuite, { Schema } from 'graphql-server-integration-testsuite';

function createApp(createOptions: HapiPluginOptions) {
const server = new hapi.Server();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as Boom from 'boom';
import { Server, Request, IReply } from 'hapi';
import { GraphQLResult, formatError } from 'graphql';
import * as GraphiQL from 'apollo-server-graphiql';
import { ApolloOptions, runQuery } from 'apollo-server-core';
import * as GraphiQL from 'graphql-server-module-graphiql';
import { ApolloOptions, runQuery } from 'graphql-server-core';

export interface IRegister {
(server: Server, options: any, next: any): void;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "apollo-server-integration-testsuite",
"name": "graphql-server-integration-testsuite",
"private": true,
"version": "0.3.2",
"description": "Apollo Server Integrations testsuite",
Expand All @@ -10,19 +10,19 @@
},
"repository": {
"type": "git",
"url": "https://github.com/apollostack/apollo-server/tree/master/packages/apollo-server-integration-testsuite"
"url": "https://github.com/apollostack/graphql-server/tree/master/packages/graphql-server-integration-testsuite"
},
"keywords": [],
"author": "Jonas Helfer <jonas@helfer.email>",
"license": "MIT",
"bugs": {
"url": "https://github.com/apollostack/apollo-server/issues"
"url": "https://github.com/apollostack/graphql-server/issues"
},
"homepage": "https://github.com/apollostack/apollo-server#readme",
"homepage": "https://github.com/apollostack/graphql-server#readme",
"dependencies": {
"apollo-server-core": "^0.3.2",
"apollo-server-graphiql": "^0.3.2",
"apollo-server-operation-store": "^0.3.2",
"graphql-server-core": "^0.3.2",
"graphql-server-module-graphiql": "^0.3.2",
"graphql-server-module-operation-store": "^0.3.2",
"supertest": "^2.0.0",
"supertest-as-promised": "^4.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
// tslint:disable-next-line
const request = require('supertest-as-promised');

import { ApolloOptions } from 'apollo-server-core';
import * as GraphiQL from 'apollo-server-graphiql';
import { OperationStore } from 'apollo-server-operation-store';
import { ApolloOptions } from 'graphql-server-core';
import * as GraphiQL from 'graphql-server-module-graphiql';
import { OperationStore } from 'graphql-server-module-operation-store';

const QueryType = new GraphQLObjectType({
name: 'QueryType',
Expand Down
File renamed without changes.
Loading

0 comments on commit 8df3383

Please sign in to comment.