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

CF Rate limiter #17

Open
wants to merge 1 commit into
base: pranavdaa/rate-limit-cf-worker
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions examples/nodejs-cf-worker/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": false
}
24 changes: 12 additions & 12 deletions examples/nodejs-cf-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ curl http://localhost:8787 -H 'Content-Type: application/json' -d '{"query": "{_

```json5
{
data: {
_meta: {
block: {
number: 202710879,
},
},
},
data: {
_meta: {
block: {
number: 202710879,
},
},
},
}
```

Expand All @@ -63,11 +63,11 @@ curl http://localhost:8787 -H 'Content-Type: application/json' -d '{"query": "qu

```json5
{
data: {
subgraph: {
id: '8SxuHUYYBLHs1UkgFFYNaS7MgrEiAMbDyt5YzwZsSa6R',
},
},
data: {
subgraph: {
id: '8SxuHUYYBLHs1UkgFFYNaS7MgrEiAMbDyt5YzwZsSa6R',
},
},
}
```

Expand Down
Binary file modified examples/nodejs-cf-worker/bun.lockb
Binary file not shown.
44 changes: 22 additions & 22 deletions examples/nodejs-cf-worker/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "@graphprotocol/query-examples-nodejs-cf-worker",
"description": "Demos how to build a CloudFlare worker function that acts as a proxy layer between your dapps and your Subgraph.",
"repository": {
"url": "https://github.com/graphprotocol/query-examples",
"directory": "/examples/nodejs-cf-worker"
},
"version": "0.1.0",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"cf-typegen": "wrangler types"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240512.0",
"typescript": "^5.4.5",
"wrangler": "^3.55.0"
},
"dependencies": {
"zod": "^3.23.8"
}
"name": "@graphprotocol/query-examples-nodejs-cf-worker",
"description": "Demos how to build a CloudFlare worker function that acts as a proxy layer between your dapps and your Subgraph.",
"repository": {
"url": "https://github.com/graphprotocol/query-examples",
"directory": "/examples/nodejs-cf-worker"
},
"version": "0.1.0",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"cf-typegen": "wrangler types",
"format": "prettier --write ."
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240512.0",
"prettier": "^3.2.5",
"typescript": "^5.4.5",
"wrangler": "^3.55.0"
},
"dependencies": {}
}
Loading