Skip to content

Commit

Permalink
Revert "docs/READMEs: add @3.x to all npm install invocations"
Browse files Browse the repository at this point in the history
This reverts commit 76344b6.
  • Loading branch information
glasser committed Jul 12, 2021
1 parent f26a499 commit 32200aa
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/source/deployment/azure-functions.md
Expand Up @@ -66,7 +66,7 @@ We will now install the dependencies and test our azure function app using apoll

```shell
cd apollo-example
npm install apollo-server-azure-functions@3.x graphql
npm install apollo-server-azure-functions graphql
```

Replace the context of the file `graphql/index.js` with the following:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/deployment/gcp-functions.mdx
Expand Up @@ -83,7 +83,7 @@ Before proceeding, you need to set up the gcloud SDK:

Next, initialize a new Node.js project by running `npm init` in an empty directory.

Run `npm install apollo-server-cloud-functions@3.x graphql` to install the necessary dependencies and to include them in the `package.json` file.
Run `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.

At this point, your `package.json` should resemble the following:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/deployment/lambda.md
Expand Up @@ -27,7 +27,7 @@ Setting up a project to work with Lambda isn't that different from a typical Nod
First, install the `apollo-server-lambda` package:

```shell
npm install apollo-server-lambda@3.x graphql
npm install apollo-server-lambda graphql
```

Next, set up the schema's type definitions and resolvers, and pass them to the `ApolloServer` constructor like normal. Here, `ApolloServer` must be imported from `apollo-server-lambda`. It's also important to note that this file must be named `graphql.js`, as the config example in a later step depends on the filename.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started.mdx
Expand Up @@ -52,7 +52,7 @@ Run the following command to install both of these dependencies and save them in
your project's `node_modules` directory:

```bash
npm install apollo-server@3.x graphql
npm install apollo-server graphql
```

Also create an empty `index.js` file in your project's root directory:
Expand Down
20 changes: 10 additions & 10 deletions docs/source/integrations/middleware.md
Expand Up @@ -140,7 +140,7 @@ async function startApolloServer(typeDefs, resolvers) {
To swap this out for `apollo-server-express`, we first install the following required packages:

```bash
npm install apollo-server-express@3.x express graphql
npm install apollo-server-express express graphql
```

We can (and should) also _uninstall_ `apollo-server`.
Expand Down Expand Up @@ -213,7 +213,7 @@ Each section also lists the options supported by each package's `applyMiddleware
`apollo-server` is the "batteries-included" Apollo Server package. It enables you to spin up a GraphQL server without thinking about web frameworks or URLs or middleware, and its main entry point (`listen`) is an `async` function instead of a callback-based function.

```bash
npm install apollo-server@3.x graphql
npm install apollo-server graphql
```

```javascript:title=index.js
Expand All @@ -239,7 +239,7 @@ If you want to do something with your server that isn't supported by `apollo-ser
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```bash
npm install apollo-server-express@3.x express graphql
npm install apollo-server-express express graphql
```

```javascript:title=index.js
Expand Down Expand Up @@ -275,7 +275,7 @@ You can call `server.getMiddleware` instead of `server.applyMiddleware` if you w
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-fastify@3.x fastify graphql
$ npm install apollo-server-fastify fastify graphql
```

```javascript
Expand Down Expand Up @@ -308,7 +308,7 @@ You _must_ `await server.start()` before calling `server.createHandler`. You can
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-hapi@3.x @hapi/hapi graphql
$ npm install apollo-server-hapi @hapi/hapi graphql
```

```javascript
Expand Down Expand Up @@ -346,7 +346,7 @@ You _must_ `await server.start()` before calling `server.applyMiddleware`. You c
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-koa@3.x koa graphql
$ npm install apollo-server-koa koa graphql
```

```javascript
Expand Down Expand Up @@ -384,7 +384,7 @@ You can call `server.getMiddleware` instead of `server.applyMiddleware` if you w
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above. You should put this code in a file called `index.js` in order for the `micro` CLI to find it.

```
$ npm install apollo-server-micro@3.x micro graphql
$ npm install apollo-server-micro micro graphql
```

```javascript:title=index.js
Expand Down Expand Up @@ -415,7 +415,7 @@ This package is a layer around `apollo-server-express`, which uses the [`@vendia
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-lambda@3.x graphql
$ npm install apollo-server-lambda graphql
```

```javascript
Expand All @@ -437,7 +437,7 @@ Because the Cloud Functions Node.js runtime uses Express, `apollo-server-cloud-f
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-cloud-functions@3.x graphql
$ npm install apollo-server-cloud-functions graphql
```

```javascript
Expand All @@ -458,7 +458,7 @@ For more details on using `apollo-server-cloud-functions`, see the [documentatio
The following example is roughly equivalent to the [`apollo-server` example](#apollo-server) above.

```
$ npm install apollo-server-azure-functions@3.x graphql
$ npm install apollo-server-azure-functions graphql
```

```javascript
Expand Down
8 changes: 4 additions & 4 deletions docs/source/performance/apq.md
Expand Up @@ -191,7 +191,7 @@ Examples for supported data stores are provided below.
### Memcached

```shell
$ npm install apollo-server-cache-memcached@3.x
$ npm install apollo-server-cache-memcached
```

```javascript
Expand All @@ -215,7 +215,7 @@ const server = new ApolloServer({
### Redis (single instance)

```shell
$ npm install apollo-server-cache-redis@3.x ioredis
$ npm install apollo-server-cache-redis ioredis
```

```javascript
Expand All @@ -240,7 +240,7 @@ const server = new ApolloServer({
### Redis (Sentinel)

```shell
$ npm install apollo-server-cache-redis@3.x ioredis
$ npm install apollo-server-cache-redis ioredis
```

```javascript
Expand Down Expand Up @@ -270,7 +270,7 @@ const server = new ApolloServer({
### Redis Cluster

```shell
$ npm install apollo-server-cache-redis@3.x ioredis
$ npm install apollo-server-cache-redis ioredis
```

```javascript
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-azure-functions/README.md
@@ -1,7 +1,7 @@
This is the Azure functions 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/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).

```shell
npm install apollo-server-azure-functions@3.x graphql
npm install apollo-server-azure-functions graphql
```

## Writing azure function
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-server-cloud-functions/README.md
Expand Up @@ -7,7 +7,7 @@
This is the Google Cloud Function 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/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).

```shell
npm install apollo-server-cloud-functions@3.x graphql
npm install apollo-server-cloud-functions graphql
```

# Deploying with Google Cloud Functions
Expand Down Expand Up @@ -84,7 +84,7 @@ Before proceeding, you need to set up the gcloud SDK:

Next, initialize a new Node.js project by running `npm init` in an empty directory.

Run `npm install apollo-server-cloud-functions@3.x graphql` to install the necessary dependencies and to include them in the `package.json` file.
Run `npm install apollo-server-cloud-functions graphql` to install the necessary dependencies and to include them in the `package.json` file.

At this point, your `package.json` should resemble the following:

Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-express/README.md
Expand Up @@ -7,7 +7,7 @@
This is the Express integration of Apollo 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/main/CHANGELOG.md)

```shell
npm install apollo-server-express@3.x graphql
npm install apollo-server-express graphql
```

## Express
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-fastify/README.md
Expand Up @@ -7,7 +7,7 @@
This is the Fastify 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/main/CHANGELOG.md)

```shell
npm install apollo-server-fastify@3.x graphql
npm install apollo-server-fastify graphql
```

## Fastify
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-hapi/README.md
Expand Up @@ -7,7 +7,7 @@
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/main/CHANGELOG.md)

```shell
npm install apollo-server-hapi@3.x graphql
npm install apollo-server-hapi graphql
```

This package has only been tested with `@hapi/hapi` 20.1.2 and higher; that is the minimum version of Hapi that supports Node 16.
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-koa/README.md
Expand Up @@ -7,7 +7,7 @@
This is the Koa 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/main/CHANGELOG.md)

```shell
npm install apollo-server-koa@3.x graphql
npm install apollo-server-koa graphql
```

## Koa
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-lambda/README.md
Expand Up @@ -7,7 +7,7 @@
This is the AWS Lambda 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/v2). [Read the CHANGELOG](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md).

```shell
npm install apollo-server-lambda@3.x graphql
npm install apollo-server-lambda graphql
```

## Deploying with AWS Serverless Application Model (SAM)
Expand Down
8 changes: 4 additions & 4 deletions packages/apollo-server-micro/README.md
Expand Up @@ -14,7 +14,7 @@ handles incoming GraphQL requests via the default `/graphql` endpoint.
1) Package installation.

```shell
npm install micro apollo-server-micro@3.x graphql
npm install micro apollo-server-micro graphql
```

2) `index.js`
Expand Down Expand Up @@ -64,7 +64,7 @@ microservice, using [`micro-cors`](https://github.com/possibilities/micro-cors):
1) Package installation.

```shell
npm install micro micro-cors apollo-server-micro@3.x graphql
npm install micro micro-cors apollo-server-micro graphql
```

2) `index.js`
Expand Down Expand Up @@ -118,7 +118,7 @@ uses a custom GraphQL endpoint path:
1) Package installation.

```shell
npm install micro apollo-server-micro@3.x graphql
npm install micro apollo-server-micro graphql
```

2) `index.js`
Expand Down Expand Up @@ -171,7 +171,7 @@ fully custom routing:
1) Package installation.

```shell
npm install micro microrouter apollo-server-micro@3.x graphql
npm install micro microrouter apollo-server-micro graphql
```

2) `index.js`
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-server-plugin-operation-registry/README.md
Expand Up @@ -9,7 +9,7 @@ In order to enable safelisting, follow the [step by step guide in the Apollo doc
The following example shows basic usage of the plugin with Apollo Server. First, add the plugin to your project's `package.json`:

```bash
npm install apollo-server-plugin-operation-registry@3.x
npm install apollo-server-plugin-operation-registry
```

Then, ensure Apollo Server has access to an [API key](https://www.apollographql.com/docs/studio/operation-registry/#6-start-apollo-server-with-apollo-studio-enabled), for example as the `APOLLO_KEY` environment variable:
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-server/README.md
Expand Up @@ -24,7 +24,7 @@ Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](./

To get started with Apollo Server:

* Install with `npm install apollo-server-<integration>@3.x graphql`
* Install with `npm install apollo-server-<integration> graphql`
* Write a GraphQL schema
* Use one of the following snippets

Expand All @@ -39,7 +39,7 @@ For more info, please refer to the [Apollo Server docs](https://www.apollographq

In a new project, install the `apollo-server` and `graphql` dependencies using:

npm install apollo-server@3.x graphql
npm install apollo-server graphql

Then, create an `index.js` which defines the schema and its functionality (i.e. resolvers):

Expand Down

0 comments on commit 32200aa

Please sign in to comment.