Skip to content

Commit 97d3225

Browse files
authored
Merge pull request #1326 from dotansimha/reason
Added reason plugin to website
2 parents c66a85a + 619abd3 commit 97d3225

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

docs/plugins/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Below is a table that lists all available plugins which can be installed via NPM
2626
| `flow` | Generate types for Flow type based on your GraphQL schema | [`graphql-codegen-flow`](./flow.md) |
2727
| `flow-resolvers` | Generate resolvers signature for Flow | [`graphql-codegen-flow-resolvers`](./flow-resolvers.md) |
2828
| `flow-documents` | Generate types for Flow type based on your GraphQL documents | [`graphql-codegen-flow-documents`](./flow-documents.md) |
29+
| `reason-client` | Generate ReasonML types based on your GraphQL schema for use in a client application | [`graphql-codegen-reason-client`](./reason-client.md) |
2930

3031
In addition, you can build your own code generating plugins based on your specific needs. For more information, check [this doc page](../custom-codegen/index).
3132

docs/plugins/reason-client.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: reason-client
3+
title: Reason Client
4+
---
5+
6+
_Built and maintained by [kgoggin](https://github.com/kgoggin)_
7+
8+
A plugin for GraphQL Codegen to generate ReasonML types based on your GraphQL schema for use in a client application.
9+
10+
## Installation
11+
12+
Install using npm/yarn:
13+
14+
```shell
15+
yarn add graphql-codegen-reason-client -D
16+
```
17+
18+
## Examples
19+
20+
Set up your project per the GraphQL Codegen Docs, and specify this plugin in your codegen.yml:
21+
22+
```yml
23+
schema: http://path.to.your.app
24+
generates:
25+
src/GraphQLTypes.re:
26+
- reason-client
27+
```
28+
29+
## Usage & Documentation
30+
31+
For the complete documentation, please refer to [kgoggin/graphql-codegen-reason](https://github.com/kgoggin/graphql-codegen-reason) repository.

website/i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
"plugins/index": {
7272
"title": "Available Plugins"
7373
},
74+
"plugins/reason-client": {
75+
"title": "Reason Client"
76+
},
7477
"plugins/schema-ast": {
7578
"title": "Schema AST"
7679
},

website/sidebars.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"plugins/fragment-matcher",
2727
"plugins/add",
2828
"plugins/time",
29-
"plugins/schema-ast"
29+
"plugins/schema-ast",
30+
"plugins/reason-client"
3031
],
3132
"Integrations": ["integrations/apollo-link-state", "integrations/create-react-app"],
3233
"Custom Code-Generator Plugins": [

0 commit comments

Comments
 (0)