Skip to content

Commit

Permalink
more readme improvements, fix json whitespace issue causing changeset…
Browse files Browse the repository at this point in the history
… bug (#29)
  • Loading branch information
acao authored Jul 30, 2022
1 parent 3b1f0b3 commit 23adfc3
Show file tree
Hide file tree
Showing 10 changed files with 575 additions and 263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: yarn

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
uses: changesets/action@v1
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# relay-graphql-js

Relay tooling based on graphql-js
Relay compatible tooling based on `graphql-js`

- [`@relay-graphql-js/graphql-config`](packages/graphql-config/) - a compatibility layer to use relay with `graphql-config` and thus `vscode-graphql` and other tools that use `graphql-config`
- [`vscode-apollo-relay`](packages/vscode-apollo-relay/) - a relay-enabled compatibility layer for `vscode-apollo` and other tools which use `apollo-config`

These compatibility layers ares all built on `@relay-graphql-js/validation-rules`, the retirement home of the legacy [`graphql-js`](https://github.com/graphql/graphql-js) compatible validation rules
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"format": "prettier --write packages/*/{src,tests}/*"
},
"devDependencies": {
"@changesets/cli": "^2.11.0",
"@changesets/cli": "^2.24.1",
"@changesets/changelog-github": "^0.4.6",
"@types/jest": "^26.0.14",
"@types/node": "^12.7.4",
"@types/relay-compiler": "^8.0.0",
Expand All @@ -36,8 +37,5 @@
"tslint": "^6.1.3",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^4.0.3"
},
"dependencies": {
"@changesets/changelog-github": "^0.4.6"
}
}
11 changes: 9 additions & 2 deletions packages/graphql-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
[![npm](https://img.shields.io/npm/v/vscode-apollo-relay.svg)](https://www.npmjs.com/package/vscode-apollo-relay)
[![build](https://img.shields.io/travis/relay-tools/vscode-apollo-relay/master.svg)](https://travis-ci.org/relay-tools/vscode-apollo-relay/builds)

Simple configuration for [`graphql-config`](https://graphql-config.com) compatibility for Relay projects.
This provides a simple configuration to may relay config to [`graphql-config`](https://graphql-config.com).

Features:

- Read all user configuration from [relay-config], if the project is setup with it.
- Reads user configuration from [relay-config], if the project is setup with it.
- Provides definitions for all Relay directives for validation and auto-completion purposes.
- Provides validation of `@argumentDefinitions` and `@arguments` directives.
- uses your locally installed `graphql` version!
- multiple environments are not supported yet but are coming soon!

[Changelog](https://github.com/relay-tools/relay-graphql-js/blob/master/packages/graphql-config/CHANGELOG.md)

Expand Down Expand Up @@ -43,6 +44,12 @@ const { config } = require("@relay-graphql-js/graphql-config").generateConfig()
module.exports = config
```


## Why you might want to use this

Simply for tooling interoperability, if nothing else.


## Limitations

This _does not_ support relay environments => `graphql-config` projects, _yet_. Open a PR if you want it to!
5 changes: 3 additions & 2 deletions packages/graphql-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@relay-graphql-js/graphql-config",
"version": "0.1.0",
"description": "full graphql config for relay graphql",
"description": "graphql-config compatibility layer for your relay project",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/relay-tools/relay-graphql-js/blob/main/packages/graphql-config#readme",
Expand All @@ -17,5 +17,6 @@
},
"devDependencies": {
"graphql-config": "^3.0.3"
}
},
"keywords": ["graphql", "relay", "graphql-config", "vscode-graphql"]
}
3 changes: 3 additions & 0 deletions packages/validation-rules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The retirement home of the original `relay-compiler` rules, which are `graphql-js` compatible.

All the libraries in this project use these rules to provide a compatibility layer for relay outside of the relay official tooling.
5 changes: 3 additions & 2 deletions packages/validation-rules/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@relay-graphql-js/validation-rules",
"version": "0.1.0",
"description": "shared validation rules for graphql-js parser",
"description": "shared relay validation rules for graphql-js parser",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/relay-tools/relay-graphql-js/blob/main/packages/validation-rules#readme",
Expand All @@ -17,5 +17,6 @@
},
"peerDependencies": {
"graphql": ">= 14 < 16"
}
},
"keywords": ["relay", "graphql", "graphql-js", "validation"]
}
2 changes: 1 addition & 1 deletion packages/vscode-apollo-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = {
}
```

### Compat
### Compatibility

If you are still using the compatibility mode of Relay you can enable additional validation rules that only apply to Relay compat. `generateConfig` takes a `compat` boolean argument to enable these extra validation rules. Ie:

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-apollo-relay/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vscode-apollo-relay",
"version": "1.6.0",
"description": "Simple configuration of vscode-apollo for Relay projects.",
"description": "Compatibility layer to use relay config with vscode-apollo and other apollo config tools",
"keywords": [
"apollo",
"graphql",
Expand Down
Loading

0 comments on commit 23adfc3

Please sign in to comment.