Skip to content

Commit 9e75824

Browse files
authored
Merge pull request #6 from bobanetwork/wsdt/graph-outsource
feat: The Graph migration (moving on from GoldSky)
2 parents 292770b + ff6b444 commit 9e75824

23 files changed

+3115
-1899
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Run tests
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: [ "*" ]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: [ "*" ]
1111

1212
jobs:
1313
build:
@@ -28,3 +28,5 @@ jobs:
2828
cache: 'npm'
2929
- run: npm i
3030
- run: npm test
31+
env:
32+
REACT_APP_THE_GRAPH_API_KEY: ${{ secrets.THE_GRAPH_API_KEY }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ node_modules
22
build
33
dist
44
.idea
5+
.env
56

67
/coverage/lcov-report
78
/coverage/coverage-summary.json

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,24 @@ GraphQL Services
2323

2424
## Release
2525
1. Run `npm run build`
26-
2. Then `npm publish --access public --otp xxxxxx`
26+
2. Then `npm publish --access public --otp xxxxxx`
27+
28+
## Installation..
29+
30+
```ssh
31+
32+
yarn add @bobanetwork/graphql-utils
33+
34+
```
35+
36+
or
37+
38+
```ssh
39+
40+
npm install @bobanetwork/graphq-utils.
41+
42+
```
43+
44+
## For smooth functioning of package need expose env var below via process.
45+
46+
`REACT_APP_THE_GRAPH_API_KEY` - The graph api key which helpfuls to fetch the graph data.

coverage/badge-branches.svg

Lines changed: 1 addition & 1 deletion
Loading

coverage/badge-functions.svg

Lines changed: 1 addition & 1 deletion
Loading

coverage/badge-lines.svg

Lines changed: 1 addition & 1 deletion
Loading

coverage/badge-statements.svg

Lines changed: 1 addition & 1 deletion
Loading

jest.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { defaults } = require('jest-config')
1+
import { defaults } from 'jest-config';
22

33
/** @type {import('jest').Config} */
44
const config = {
@@ -18,7 +18,8 @@ const config = {
1818
"json-summary",
1919
"text",
2020
"lcov"
21-
]
22-
}
21+
],
22+
testTimeout: 60000,
23+
};
2324

24-
module.exports = config
25+
export default config;

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "GraphQL services to be consumed by frontend/backend services.",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
7+
"type": "module",
78
"files": [
89
"dist"
910
],
@@ -26,14 +27,17 @@
2627
"@apollo/client": "3.5.10",
2728
"@ethersproject/providers": "^5.7.2",
2829
"@types/jest": "^29.5.12",
30+
"dotenv": "^16.4.5",
2931
"ethers": "^5.5.4",
32+
"graphql": "^16.8.2",
3033
"node-fetch": "^2.6.1",
3134
"ts-jest": "^29.1.2"
3235
},
3336
"devDependencies": {
3437
"@types/node": "^16.18.62",
3538
"@types/node-fetch": "^2.6.11",
3639
"jest": "^29.7.0",
40+
"jest-config": "^29.7.0",
3741
"jest-coverage-badges": "^1.1.2",
3842
"tsup": "^8.0.2",
3943
"typescript": "^5.4.2"

0 commit comments

Comments
 (0)