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
56 changes: 56 additions & 0 deletions examples/transforms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### The Graph Client / Transforms

This examples indicates the use of the transforms property.

The graph client has some built-in transforms:

[Block Tracking](https://github.com/graphprotocol/graph-client#block-tracking)
[Auto Pagination](https://github.com/graphprotocol/graph-client#automatic-pagination)

GraphQL Mesh also features more transforms which you can read about [here.](https://the-guild.dev/graphql/mesh/docs/transforms/transforms-introduction)

The example here is using the following tools/concepts:

- The Graph Client CLI for generating artifacts
- GraphQL Mesh prefix transform (https://the-guild.dev/graphql/mesh/docs/transforms/prefix)
- GraphQL Codegen for type safe SDK

### Getting Started

To run this example, make sure to install the dependencies in the root of the monorepo, and then run this example:

```
# In the root directory
$ yarn install
$ yarn build
$ cd examples/transforms/
$ yarn start
```

### Building

You can also build the client sdk by running: `yarn build`.

### GraphQL Mesh Transforms Usage

To run any transforms on your project from graphql mesh you will need to install the transforms respective dependency. For eg. in this project the prefix transform is used which requires the `@graphql-mesh/transform-prefix` dependency.

Install it by running:

With npm

```
npm i -D @graphql-mesh/transform-prefix
```

With yarn

```
yarn add -D @graphql-mesh/transform-prefix
```

With pnpm

```
pnpm add -D @graphql-mesh/transform-prefix
```
2 changes: 2 additions & 0 deletions examples/transforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"private": true,
"version": "0.0.5",
"scripts": {
"build": "graphclient build",
"start": "graphclient serve-dev"
},
"dependencies": {
"@graphprotocol/client-cli": "2.2.20",
"@graphql-mesh/transform-prefix": "0.12.23",
"graphql": "16.6.0"
}
}