Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apollo graphql link and server #224

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5740056
feat: (wip) apollo graphl link and server
viglucci Mar 25, 2022
0e5b04f
refactor: move apollo server to its own project
viglucci Mar 25, 2022
e7e00ab
feat: (wip) initial implementation of Apollo Server support
viglucci Mar 25, 2022
9dd8b1f
feat: expand example to use arguments in query
viglucci Mar 25, 2022
8d40df8
feat: expand example to use arguments in query
viglucci Mar 25, 2022
73c28ea
feat: (wip) map subscription to requestStream
viglucci Mar 26, 2022
65732ad
fix: return proper structure from subscription resolver
viglucci Mar 26, 2022
1dff17e
fix: update subscription query to include argument
viglucci Mar 27, 2022
8b078fd
refactor: update apollo example
viglucci Mar 27, 2022
7242d2e
feat: add RSocketLink that splits between Query and Subscription links
viglucci Mar 27, 2022
202cd13
feat: update example to use RSocketLink
viglucci Mar 27, 2022
bfcbc40
refactor: restructure apollo graphql example
viglucci Mar 27, 2022
10eb446
fix: adding missing license headers
viglucci Mar 27, 2022
9955ce4
fix: cancel requestStream when client subscription is canceled
viglucci Mar 27, 2022
0ed0572
refactor: use graphql file + for schema
viglucci Mar 27, 2022
10fad7d
feat: setup resolver for chat like subscriptions
viglucci Mar 27, 2022
10cc3ec
feat: cancellation for query operation
viglucci Mar 27, 2022
d1472c3
refactor: assignment refactor
viglucci Mar 27, 2022
df277cc
refactor: update example
viglucci Mar 27, 2022
ed92363
refactor: implement lazy reactive API for subscription requests
viglucci Mar 28, 2022
fcd149c
feat: include application/graphql+json mimetype in query operation
viglucci Mar 30, 2022
ec37bf6
refactor: add queryOperationSubscriber helper + reorder methods on se…
viglucci Mar 30, 2022
79eb3a2
chore: add todo in subscription link
viglucci Apr 1, 2022
f97387b
refactor: update gql subscriptions example
viglucci Apr 1, 2022
f9cd36d
chore: drop org from package names (to be added back later)
viglucci Apr 25, 2022
392ed93
chore: ignore package-lock.json and prefer Yarn lock files in source …
viglucci Apr 25, 2022
2a5521b
chore: drop org in package names in imports
viglucci Apr 25, 2022
04f7b86
chore: fix linting errors
viglucci Apr 25, 2022
1712f5b
chore: add lerna command config
viglucci Apr 27, 2022
1f560c5
chore(wip): add workflow for releasing via manual dispatch
viglucci Apr 27, 2022
e154216
chore(wip): add steps to publish job
viglucci Apr 27, 2022
092c6ce
chore(wip): add step to set NPM auth token
viglucci Apr 27, 2022
12d7e97
Release workflow setup via GH actions (#222)
viglucci Apr 27, 2022
1cc7b39
chore: fix linting
viglucci Apr 27, 2022
6ce406b
chore: add missing licenses to packages
viglucci Apr 27, 2022
4af4d60
chore: add missing README files to packages
viglucci Apr 27, 2022
ecdd2c9
chore: align package names with existing published packages
viglucci Apr 27, 2022
41337e8
docs: update readme
viglucci Apr 28, 2022
9f10876
docs: update readme for license reference
viglucci Apr 27, 2022
2a21e55
docs: add examples reference to readme
viglucci Apr 28, 2022
31bf81b
chore: add LICENSE to apollo packages
viglucci Apr 28, 2022
53f7d4a
fix: align payload with application/graphql+json spec
viglucci May 2, 2022
7a5c6ff
chore: add testing example for calling a spring boot graphql server
viglucci May 2, 2022
8c5448c
refactor: move apollo examples to individual directories
viglucci May 2, 2022
59cb692
refactor: change apollo graphql config from endpoint to route
viglucci May 2, 2022
bce8ff8
chore: linting fix
viglucci May 2, 2022
360166f
feat: use application/json for graphql mimetype
viglucci May 8, 2022
8dce80d
refactor: update graphql example script names
viglucci May 8, 2022
52b4463
refactor: reference datatMimeType from WellKnownMimeType
viglucci May 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build

on:
workflow_dispatch:
push:
pull_request:
branches: [ $default-branch ]
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Test, Build, Release

on:
workflow_dispatch:
inputs:
shouldPublish:
description: 'Publish'
required: true
default: true
type: boolean

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Yarn
run: npm install -g yarn

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.yarn
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Lint
run: yarn lint

test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Yarn
run: npm install -g yarn

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.yarn
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Test
run: yarn test

compile_publish:
needs:
- lint
- test

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12

- name: Install Yarn
run: npm install -g yarn

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.yarn
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Compile
run: yarn build

- uses: fregante/setup-git-user@v1

- name: Set NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
if: ${{ github.event.inputs.shouldPublish == 'true' }}
run: yarn lerna publish from-package --yes --no-verify-access

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ yarn-error.log
# and uncomment the following lines
# .pnp.*

### npm ###
# the project uses Yarn so we will not check in package-lock files
package-lock.json

### macOS ###
# General
.DS_Store
Expand Down
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
## Under Development

**This branch is a work in progress rewrite of rsocket-js from [Flow](https://flow.org/) to [TypeScript](https://www.typescriptlang.org/). Please see [#158](https://github.com/rsocket/rsocket-js/issues/158).**

**You SHOULD NOT leverage any artifacts published from this branch as all are considered unstable.**

**Please see the [master](https://github.com/rsocket/rsocket-js/tree/master) branch for source used to publish the latest `0.x.x` versions on NPM.**

# [rsocket-js](https://github.com/rsocket/rsocket-js)

[![Build](https://github.com/rsocket/rsocket-js/actions/workflows/build.yml/badge.svg?branch=1.0.x)](https://github.com/rsocket/rsocket-js/actions/workflows/build.yml)
Expand All @@ -26,18 +18,39 @@ protocol intended for use in browsers and/or Node.js. From [rsocket.io](http://r
> - event subscription (infinite stream of many)
> - channel (bi-directional streams)

## Install
## Status

This branch contains a rewrite (with significant changes) of rsocket-js from [Flow](https://flow.org/) to [TypeScript](https://www.typescriptlang.org/). Please see [#158](https://github.com/rsocket/rsocket-js/issues/158) for additional details.

The artifacts published from this branch are considered UNSTABLE and may be subject to breaking changes while in preview.

TODO: add install instructions
**Please see the [master](https://github.com/rsocket/rsocket-js/tree/master) branch for sources related to `0.x.x` versions.**

## Installation

Individual packages published from this monorepo are distributed via NPM.

Packages are independently versioned.

- [rsocket-core](https://www.npmjs.com/package/rsocket-core)
- [rsocket-messaging](https://www.npmjs.com/package/rsocket-messaging)
- [rsocket-composite-metadata](https://www.npmjs.com/package/rsocket-composite-metadata)
- [rsocket-tcp-client](https://www.npmjs.com/package/rsocket-tcp-client)
- [rsocket-tcp-server](https://www.npmjs.com/package/rsocket-tcp-server)
- [rsocket-websocket-client](https://www.npmjs.com/package/rsocket-websocket-client)
- [rsocket-websocket-server](https://www.npmjs.com/package/rsocket-websocket-server)
- [rsocket-adapter-rxjs](https://www.npmjs.com/package/rsocket-adapter-rxjs)

## Contributing

TODO: add `CONTRIBUTING.md`

## Documentation
## Documentation & Examples

See [packages/rsocket-examples](https://github.com/rsocket/rsocket-js/tree/1.0.x-alpha/packages/rsocket-examples/src) for examples.

https://rsocket.io/guides/rsocket-js
Guides for `0.x.x` versions can be found on https://rsocket.io/guides/rsocket-js.

## License

TODO: add license
See LICENSE file.
23 changes: 23 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Release

How to publish new releases for this project.

## Versioning

[semver](https://semver.org/) should be followed when deciding new release versions.

You can either set versions in the `package.json` files manually, or use the `lerna version` command to set them via the Lerna CLI. When setting versions manually, you will also need to set the git tags for each package and version. For this reason, it is recommended you use the `lerna version` command, which will create these tags automatically.

ex: `@rsocket/[email protected]`

Lerna will not push the git tags after creation. You should push the git tags once you are confident in your changes.

## Publishing

The `Test, Build, Release` Workflow on GitHub can be run to [manually trigger](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow) publishing of packages to NPM. This workflow will only publish versions which do not already exist on NPM.

The `Test, Build, Release` Workflow will:

- Run automated linting & tests
- Compile/build various packages
- Publish built packages to NPM
11 changes: 10 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@
],
"version": "independent",
"useWorkspaces": true,
"npmClient": "yarn"
"npmClient": "yarn",
"command": {
"publish": {
"message": "chore(release): release"
},
"version": {
"push": false,
"allowBranch": ["main", "1.0.x-alpha"]
}
}
}
Loading