Skip to content

Commit

Permalink
refactor: Rename to graphql-ws (#43)
Browse files Browse the repository at this point in the history
* refactor: to `graphql-ws`

* docs: generate

* docs(changelog): cleanup

* refactor: to new version

* docs: release from master
  • Loading branch information
enisdenjo authored Oct 25, 2020
1 parent fcefb7f commit 6bcec6e
Show file tree
Hide file tree
Showing 26 changed files with 110 additions and 110 deletions.
112 changes: 56 additions & 56 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to `graphql-transport-ws`
# Contributing to `graphql-ws`

## Reporting Issues

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<h6>Coherent, zero-dependency, lazy, simple, <a href="PROTOCOL.md">GraphQL over WebSocket Protocol</a> compliant server and client.</h6>

[![Continuous integration](https://github.com/enisdenjo/graphql-transport-ws/workflows/Continuous%20integration/badge.svg)](https://github.com/enisdenjo/graphql-transport-ws/actions?query=workflow%3A%22Continuous+integration%22) [![graphql-transport-ws](https://img.shields.io/npm/v/graphql-transport-ws.svg?label=graphql-transport-ws&logo=npm)](https://www.npmjs.com/package/graphql-transport-ws)
[![Continuous integration](https://github.com/enisdenjo/graphql-ws/workflows/Continuous%20integration/badge.svg)](https://github.com/enisdenjo/graphql-ws/actions?query=workflow%3A%22Continuous+integration%22) [![graphql-ws](https://img.shields.io/npm/v/graphql-ws.svg?label=graphql-ws&logo=npm)](https://www.npmjs.com/package/graphql-ws)

<br />
</div>
Expand All @@ -15,7 +15,7 @@
#### Install

```shell
$ yarn add graphql-transport-ws
$ yarn add graphql-ws
```

#### Create a GraphQL schema
Expand Down Expand Up @@ -53,7 +53,7 @@ const roots = {
```ts
import https from 'https';
import { execute, subscribe } from 'graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';

const server = https.createServer(function weServeSocketsOnly(_, res) {
res.writeHead(404);
Expand All @@ -79,7 +79,7 @@ server.listen(443);
#### Use the client

```ts
import { createClient } from 'graphql-transport-ws';
import { createClient } from 'graphql-ws';

const client = createClient({
url: 'wss://welcomer.com/graphql',
Expand Down Expand Up @@ -133,7 +133,7 @@ const client = createClient({
<summary>Client usage with Promise</summary>

```ts
import { createClient, SubscribePayload } from 'graphql-transport-ws';
import { createClient, SubscribePayload } from 'graphql-ws';

const client = createClient({
url: 'wss://hey.there/graphql',
Expand Down Expand Up @@ -212,7 +212,7 @@ import {
RequestParameters,
Variables,
} from 'relay-runtime';
import { createClient } from 'graphql-transport-ws';
import { createClient } from 'graphql-ws';

const subscriptionsClient = createClient({
url: 'wss://i.love/graphql',
Expand Down Expand Up @@ -272,7 +272,7 @@ export const network = Network.create(fetchOrSubscribe, fetchOrSubscribe);

```typescript
import { ApolloLink, Operation, FetchResult, Observable } from '@apollo/client';
import { createClient, Config, Client } from 'graphql-transport-ws';
import { createClient, Config, Client } from 'graphql-ws';

class WebSocketLink extends ApolloLink {
private client: Client;
Expand Down Expand Up @@ -329,7 +329,7 @@ const link = new WebSocketLink({
```ts
const WebSocket = require('ws'); // yarn add ws
const Crypto = require('crypto');
const { createClient } = require('graphql-transport-ws');
const { createClient } = require('graphql-ws');

const client = createClient({
url: 'wss://no.browser/graphql',
Expand All @@ -356,7 +356,7 @@ const client = createClient({
import https from 'https';
import express from 'express';
import { graphqlHTTP } from 'express-graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';
import { execute, subscribe } from 'graphql';
import { schema } from 'my-graphql-schema';

Expand Down Expand Up @@ -390,7 +390,7 @@ server.listen(443, () => {
```typescript
import https from 'https';
import { execute, subscribe } from 'graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';

const server = https.createServer(function weServeSocketsOnly(_, res) {
res.writeHead(404);
Expand Down Expand Up @@ -435,7 +435,7 @@ import https from 'https';
import WebSocket from 'ws';
import url from 'url';
import { execute, subscribe } from 'graphql';
import { createServer, createClient } from 'graphql-transport-ws';
import { createServer, createClient } from 'graphql-ws';
import { schema } from 'my-graphql-schema';

const server = https.createServer(function weServeSocketsOnly(_, res) {
Expand Down Expand Up @@ -493,7 +493,7 @@ server.listen(443);

```typescript
import { validate, execute, subscribe } from 'graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';
import { schema, roots, getStaticContext } from 'my-graphql';

createServer(
Expand All @@ -518,7 +518,7 @@ createServer(

```typescript
import { parse, validate, execute, subscribe } from 'graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';
import { schema, getDynamicContext, myValidationRules } from 'my-graphql';

createServer(
Expand Down Expand Up @@ -559,7 +559,7 @@ createServer(
// 🛸 server

import { parse, execute, subscribe } from 'graphql';
import { createServer } from 'graphql-transport-ws';
import { createServer } from 'graphql-ws';
import { schema } from 'my-graphql-schema';

// a unique GraphQL execution ID used for representing
Expand Down Expand Up @@ -600,7 +600,7 @@ createServer(
```typescript
// 📺 client

import { createClient } from 'graphql-transport-ws';
import { createClient } from 'graphql-ws';

const client = createClient({
url: 'wss://persisted.graphql/queries',
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
**[graphql-transport-ws](README.md)**
**[graphql-ws](README.md)**

> Globals
# graphql-transport-ws
# graphql-ws

## Index

Expand Down
2 changes: 1 addition & 1 deletion docs/enums/_message_.messagetype.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / MessageType
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_client_.client.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["client"](../modules/_client_.md) / Client
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_client_.clientoptions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["client"](../modules/_client_.md) / ClientOptions
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.completemessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / CompleteMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.connectionackmessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / ConnectionAckMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.connectioninitmessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / ConnectionInitMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.errormessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / ErrorMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.nextmessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / NextMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.subscribemessage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / SubscribeMessage
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_message_.subscribepayload.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["message"](../modules/_message_.md) / SubscribePayload
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_server_.context.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["server"](../modules/_server_.md) / Context
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_server_.server.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["server"](../modules/_server_.md) / Server
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_server_.serveroptions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["server"](../modules/_server_.md) / ServerOptions
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_types_.disposable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["types"](../modules/_types_.md) / Disposable
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/_types_.sink.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / ["types"](../modules/_types_.md) / Sink
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_client_.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / "client"
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_message_.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / "message"
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_protocol_.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / "protocol"
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_server_.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / "server"
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_types_.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**[graphql-transport-ws](../README.md)**
**[graphql-ws](../README.md)**

> [Globals](../README.md) / "types"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graphql-transport-ws",
"name": "graphql-ws",
"version": "1.9.0",
"description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client",
"keywords": [
Expand All @@ -16,10 +16,10 @@
"apollo"
],
"license": "MIT",
"homepage": "https://github.com/enisdenjo/graphql-transport-ws#readme",
"homepage": "https://github.com/enisdenjo/graphql-ws#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/enisdenjo/graphql-transport-ws.git"
"url": "git+https://github.com/enisdenjo/graphql-ws.git"
},
"main": "lib/index.js",
"browser": "lib/client.js",
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1218,9 +1218,9 @@ __metadata:
languageName: node
linkType: hard

"@eslint/eslintrc@npm:^0.1.3":
version: 0.1.3
resolution: "@eslint/eslintrc@npm:0.1.3"
"@eslint/eslintrc@npm:^0.2.0":
version: 0.2.0
resolution: "@eslint/eslintrc@npm:0.2.0"
dependencies:
ajv: ^6.12.4
debug: ^4.1.1
Expand All @@ -1232,7 +1232,7 @@ __metadata:
lodash: ^4.17.19
minimatch: ^3.0.4
strip-json-comments: ^3.1.1
checksum: e9c5eaa5e706bcedbba6e7e1a2bc85faa7e3a9edbe71375e07240d1b6540fbb88d907bd5e5841b42c2a7a9683dcf031ea052c447c3c9d81ba4d0b74f0dd67e5f
checksum: bdc8346add0fe57337c09134f19e693fa8a3c03357bf54c05de2270388774b0469b6d6dbd9f368cbd5de53919c4c9e8b644177acc417ea1ff4f99cbf32feefa6
languageName: node
linkType: hard

Expand Down Expand Up @@ -2801,9 +2801,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.30001135":
version: 1.0.30001150
resolution: "caniuse-lite@npm:1.0.30001150"
checksum: ff8944b2ca6db465e9e878be38f66efad7f4a8cf06aea7c3d463b428649266f75b84dddd130fd3fd46841e160cfac3cfedbe40f3434f428ceaaa709ef6b8b2b1
version: 1.0.30001151
resolution: "caniuse-lite@npm:1.0.30001151"
checksum: 3acb52ac17034d7abe4468e66293c9e5597cb5f123bd8f86ea3b87e758112ac4259fdbc35f8f4cbf5477e385dd975f11031bfbf26f4cec64d64a0c567a430b58
languageName: node
linkType: hard

Expand Down Expand Up @@ -3984,11 +3984,11 @@ __metadata:
linkType: hard

"eslint@npm:^7.11.0":
version: 7.11.0
resolution: "eslint@npm:7.11.0"
version: 7.12.0
resolution: "eslint@npm:7.12.0"
dependencies:
"@babel/code-frame": ^7.0.0
"@eslint/eslintrc": ^0.1.3
"@eslint/eslintrc": ^0.2.0
ajv: ^6.10.0
chalk: ^4.0.0
cross-spawn: ^7.0.2
Expand Down Expand Up @@ -4026,7 +4026,7 @@ __metadata:
v8-compile-cache: ^2.0.3
bin:
eslint: bin/eslint.js
checksum: 45ef6dc7b31684ca0f383ed9c6224e763197e1d49745542f4440e37286c947973388a6a7ebbf103eeee91ddb4af2652c5d22718f4130bfbbf4bd16a04103f82a
checksum: 22f86c0ebaf75993d197d230a8c35f11ba4ffc7cd0b280aeecb28a04c26446b9e6906eedee264a445311a3b9b31f9bca787ee58546acc087cb2c1056ca89f624
languageName: node
linkType: hard

Expand Down Expand Up @@ -4782,9 +4782,9 @@ fsevents@^2.1.2:
languageName: node
linkType: hard

"graphql-transport-ws@workspace:.":
"graphql-ws@workspace:.":
version: 0.0.0-use.local
resolution: "graphql-transport-ws@workspace:."
resolution: "graphql-ws@workspace:."
dependencies:
"@babel/core": ^7.12.3
"@babel/plugin-proposal-class-properties": ^7.12.1
Expand Down

0 comments on commit 6bcec6e

Please sign in to comment.