From aceb93e038f353c40f2fbef664b7eb88a3cbf9b9 Mon Sep 17 00:00:00 2001 From: chentsulin Date: Mon, 2 Jul 2018 12:30:22 +0800 Subject: [PATCH] fix some badge links --- packages/apollo-engine-reporting/README.md | 2 +- packages/apollo-server-caching/README.md | 5 ++++ packages/apollo-server-core/README.md | 3 +++ packages/apollo-server-express/README.md | 6 ++--- .../src/apolloServerHttp.test.ts | 4 +-- packages/apollo-server-hapi/README.md | 2 +- packages/apollo-server-memcached/README.md | 3 +++ packages/apollo-server-redis/README.md | 3 +++ packages/apollo-server/README.md | 3 +++ packages/graphql-extensions/README.md | 5 +++- test/tests.js | 27 ++++++++++--------- 11 files changed, 43 insertions(+), 20 deletions(-) diff --git a/packages/apollo-engine-reporting/README.md b/packages/apollo-engine-reporting/README.md index 03daee3c71c..b34ba15880f 100644 --- a/packages/apollo-engine-reporting/README.md +++ b/packages/apollo-engine-reporting/README.md @@ -1,6 +1,6 @@ # apollo-engine-reporting [![npm version](https://badge.fury.io/js/apollo-engine-reporting.svg)](https://badge.fury.io/js/apollo-engine-reporting) -[![Build Status](https://circleci.com/gh/apollographql/apollo-engine-reporting.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-engine-reporting) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) This package is a pure JS implementation of the Apollo Engine reporting feature. It is a work in progress and is not recommended for production use. diff --git a/packages/apollo-server-caching/README.md b/packages/apollo-server-caching/README.md index 03aa96a6139..4f8cbb50233 100644 --- a/packages/apollo-server-caching/README.md +++ b/packages/apollo-server-caching/README.md @@ -1,3 +1,8 @@ +# apollo-server-caching + +[![npm version](https://badge.fury.io/js/apollo-server-caching.svg)](https://badge.fury.io/js/apollo-server-caching) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) + ## Implementing your own Cache Internally, Apollo Server uses the `KeyValueCache` interface to provide a caching store for the Data Sources. An in-memory LRU cache is used by default, and we provide connectors for [Memcached](../apollo-server-memcached)/[Redis](../apollo-server-redis) backends. diff --git a/packages/apollo-server-core/README.md b/packages/apollo-server-core/README.md index 77b9e248c04..741aaec2f35 100644 --- a/packages/apollo-server-core/README.md +++ b/packages/apollo-server-core/README.md @@ -1,4 +1,7 @@ # apollo-server-core +[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) + This is the core module of the Apollo community GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md) diff --git a/packages/apollo-server-express/README.md b/packages/apollo-server-express/README.md index 0f4e8fed45d..63b79e94d3d 100644 --- a/packages/apollo-server-express/README.md +++ b/packages/apollo-server-express/README.md @@ -3,7 +3,7 @@ title: Express / Connect description: Setting up Apollo Server with Express.js or Connect --- -[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack) +[![npm version](https://badge.fury.io/js/apollo-server-express.svg)](https://badge.fury.io/js/apollo-server-express) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack) This is the Express and Connect integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md) @@ -38,7 +38,7 @@ server.applyMiddleware({ app }); app.listen({ port: 4000 }, () => console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`) -) +); ``` ## Connect @@ -72,7 +72,7 @@ server.applyMiddleware({ app, path }); app.listen({ port: 4000 }, () => console.log(`🚀 Server ready at http://localhost:4000${server.graphqlPath}`) -) +); ``` > Note; `qs-middleware` is only required if running outside of Meteor diff --git a/packages/apollo-server-express/src/apolloServerHttp.test.ts b/packages/apollo-server-express/src/apolloServerHttp.test.ts index 08f8255a6c0..9e57ab91931 100644 --- a/packages/apollo-server-express/src/apolloServerHttp.test.ts +++ b/packages/apollo-server-express/src/apolloServerHttp.test.ts @@ -25,8 +25,8 @@ import { expect } from 'chai'; import * as zlib from 'zlib'; import * as multer from 'multer'; import * as bodyParser from 'body-parser'; -const request = require('supertest'); -const express4 = require('express'); // modern +import * as request from 'supertest'; +import * as express4 from 'express'; // modern import { GraphQLSchema, GraphQLObjectType, diff --git a/packages/apollo-server-hapi/README.md b/packages/apollo-server-hapi/README.md index c1442642f1b..ac34f839b4a 100644 --- a/packages/apollo-server-hapi/README.md +++ b/packages/apollo-server-hapi/README.md @@ -3,7 +3,7 @@ title: Hapi description: Setting up Apollo Server with Hapi --- -[![npm version](https://badge.fury.io/js/apollo-server-core.svg)](https://badge.fury.io/js/apollo-server-core) [![Build Status](https://circleci.com/gh/apollographql/apollo-cache-control-js.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-cache-control-js) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack) +[![npm version](https://badge.fury.io/js/apollo-server-hapi.svg)](https://badge.fury.io/js/apollo-server-hapi) [![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) [![Coverage Status](https://coveralls.io/repos/github/apollographql/apollo-server/badge.svg?branch=master)](https://coveralls.io/github/apollographql/apollo-server?branch=master) [![Get on Slack](https://img.shields.io/badge/slack-join-orange.svg)](https://www.apollographql.com/#slack) This is the Hapi integration of Apollo Server. Apollo Server is a community-maintained open-source Apollo Server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md) diff --git a/packages/apollo-server-memcached/README.md b/packages/apollo-server-memcached/README.md index 02265a21dd9..4ee668b659c 100644 --- a/packages/apollo-server-memcached/README.md +++ b/packages/apollo-server-memcached/README.md @@ -1,5 +1,8 @@ ## MemcachedCache +[![npm version](https://badge.fury.io/js/apollo-server-memcached.svg)](https://badge.fury.io/js/apollo-server-memcached) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) + This package exports an implementation of `KeyValueCache` that allows using Memcached as a backing store for resource caching in [Data Sources](https://www.apollographql.com/docs/apollo-server/v2/features/data-sources.html). ## Usage diff --git a/packages/apollo-server-redis/README.md b/packages/apollo-server-redis/README.md index 3b2600a86ca..8094956546b 100644 --- a/packages/apollo-server-redis/README.md +++ b/packages/apollo-server-redis/README.md @@ -1,5 +1,8 @@ ## RedisCache +![npm version](https://badge.fury.io/js/apollo-server-redis.svg)](https://badge.fury.io/js/apollo-server-redis) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) + This package exports an implementation of `KeyValueCache` that allows using Redis as a backing store for resource caching in [Data Sources](https://www.apollographql.com/docs/apollo-server/v2/features/data-sources.html). ## Usage diff --git a/packages/apollo-server/README.md b/packages/apollo-server/README.md index 78ba3a40928..1df826e6f26 100644 --- a/packages/apollo-server/README.md +++ b/packages/apollo-server/README.md @@ -1,4 +1,7 @@ # Apollo Server +[![npm version](https://badge.fury.io/js/apollo-server.svg)](https://badge.fury.io/js/apollo-server) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) + Apollo Server is a production ready GraphQL Server. [Read the docs.](https://www.apollographql.com/docs/apollo-server/) [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md) diff --git a/packages/graphql-extensions/README.md b/packages/graphql-extensions/README.md index 9672cee6526..56441f1d517 100644 --- a/packages/graphql-extensions/README.md +++ b/packages/graphql-extensions/README.md @@ -1 +1,4 @@ -# graphql-middleware \ No newline at end of file +# graphql-extensions + +[![npm version](https://badge.fury.io/js/graphql-extensions.svg)](https://badge.fury.io/js/graphql-extensions) +[![Build Status](https://circleci.com/gh/apollographql/apollo-server.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-server) diff --git a/test/tests.js b/test/tests.js index 22d0686cdbb..a72fd79d221 100644 --- a/test/tests.js +++ b/test/tests.js @@ -8,25 +8,28 @@ process.on('unhandledRejection', reason => { console.log('Stack: ' + reason.stack); }); -//apollo-server-core -require('../packages/apollo-server-core/dist/runQuery.test.js'); -require('../packages/apollo-server-core/dist/runHttpQuery.test.js'); -require('../packages/apollo-server-core/dist/errors.test.js'); +// apollo-server-core +require('../packages/apollo-server-core/dist/runQuery.test'); +require('../packages/apollo-server-core/dist/runHttpQuery.test'); +require('../packages/apollo-server-core/dist/errors.test'); -//Apollo server 2 tests +// Apollo server 2 tests -//apollo-server -require('../packages/apollo-server/dist/index.test.js'); +// apollo-server +require('../packages/apollo-server/dist/index.test'); -require('../packages/apollo-server-express/dist/ApolloServer.test.js'); +// apollo-server-express +require('../packages/apollo-server-express/dist/ApolloServer.test'); require('../packages/apollo-server-express/dist/expressApollo.test'); require('../packages/apollo-server-express/dist/connectApollo.test'); require('../packages/apollo-server-express/dist/datasource.test'); +require('../packages/apollo-server-express/dist/apolloServerHttp.test'); +// apollo-server-hapi (NODE_MAJOR_VERSION >= 9 || - (NODE_MAJOR_VERSION >= 8 && NODE_MAJOR_REVISION >= 9)) && -require('../packages/apollo-server-hapi/dist/hapiApollo.test') && // Hapi 17 is 8.9+ - require('../packages/apollo-server-hapi/dist/ApolloServer.test.js'); -require('../packages/apollo-server-express/dist/apolloServerHttp.test'); + (NODE_MAJOR_VERSION >= 8 && NODE_MAJOR_REVISION >= 9)) && // Hapi 17 is 8.9+ + require('../packages/apollo-server-hapi/dist/hapiApollo.test') && + require('../packages/apollo-server-hapi/dist/ApolloServer.test'); +// apollo-server-lambda require('../packages/apollo-server-lambda/dist/lambdaApollo.test');