Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 docs/plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Below is a table that lists all available plugins which can be installed via NPM
| `flow` | Generate types for Flow type based on your GraphQL schema | [`graphql-codegen-flow`](./flow.md) |
| `flow-resolvers` | Generate resolvers signature for Flow | [`graphql-codegen-flow-resolvers`](./flow-resolvers.md) |
| `flow-documents` | Generate types for Flow type based on your GraphQL documents | [`graphql-codegen-flow-documents`](./flow-documents.md) |
| `reason-client` | Generate ReasonML types based on your GraphQL schema for use in a client application | [`graphql-codegen-reason-client`](./reason-client.md) |

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).

Expand Down
31 changes: 31 additions & 0 deletions docs/plugins/reason-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: reason-client
title: Reason Client
---

_Built and maintained by [kgoggin](https://github.com/kgoggin)_

A plugin for GraphQL Codegen to generate ReasonML types based on your GraphQL schema for use in a client application.

## Installation

Install using npm/yarn:

```shell
yarn add graphql-codegen-reason-client -D
```

## Examples

Set up your project per the GraphQL Codegen Docs, and specify this plugin in your codegen.yml:

```yml
schema: http://path.to.your.app
generates:
src/GraphQLTypes.re:
- reason-client
```

## Usage & Documentation

For the complete documentation, please refer to [kgoggin/graphql-codegen-reason](https://github.com/kgoggin/graphql-codegen-reason) repository.
3 changes: 3 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"plugins/index": {
"title": "Available Plugins"
},
"plugins/reason-client": {
"title": "Reason Client"
},
"plugins/schema-ast": {
"title": "Schema AST"
},
Expand Down
3 changes: 2 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"plugins/fragment-matcher",
"plugins/add",
"plugins/time",
"plugins/schema-ast"
"plugins/schema-ast",
"plugins/reason-client"
],
"Integrations": ["integrations/apollo-link-state", "integrations/create-react-app"],
"Custom Code-Generator Plugins": [
Expand Down