Skip to content

Commit 4edb4bf

Browse files
feat: add dataprotector subgraph integration and update poco queries (#65)
* feat: add dataprotector subgraph integration and update poco queries * fix: format dataprotector subgraph URL for Bellecour chain * fix: correct casing in dataprotector codegen configuration * fix: update import paths for GraphQL queries to use poco directory * feat(graphql): add execute function for dataprotector and poco subgraphs * fix: remove unused parameter from dataset type cell renderer * refactor: remove TypeBadge component and its usage in columns definition * fix: update import paths for GraphQL queries to use poco directory * fix: update dataprotector subgraph URL and refine document patterns in codegen configurations
1 parent b009046 commit 4edb4bf

File tree

84 files changed

+157
-8552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+157
-8552
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
VITE_POCO_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/poco-v5"
2+
VITE_DATAPROTECTOR_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2"
23
VITE_REOWN_PROJECT_ID=b89f75687c01fa0df9e68c903283012d

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14-
src/graphql/*
15-
!src/graphql/execute.ts
14+
src/graphql/poco/*
15+
src/graphql/dataprotector/*
16+
!src/graphql/poco/execute.ts
17+
!src/graphql/dataprotector/execute.ts
1618

1719
# misc
1820
.DS_Store

codegenDataprotector.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { CodegenConfig } from '@graphql-codegen/cli'
2+
import * as dotenv from 'dotenv';
3+
4+
dotenv.config();
5+
6+
const config: CodegenConfig = {
7+
schema: process.env.VITE_DATAPROTECTOR_SUBGRAPH_URL,
8+
documents: ['src/**/*DpQuery.ts'],
9+
ignoreNoDocuments: true,
10+
generates: {
11+
'./src/graphql/dataprotector/': {
12+
preset: 'client',
13+
config: {
14+
documentMode: 'string'
15+
}
16+
},
17+
'./src/graphql/dataprotector/schema.graphql': {
18+
plugins: ['schema-ast'],
19+
config: {
20+
includeDirectives: true
21+
}
22+
}
23+
}
24+
}
25+
26+
export default config

codegenPoco.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ dotenv.config();
55

66
const config: CodegenConfig = {
77
schema: process.env.VITE_POCO_SUBGRAPH_URL,
8-
documents: ['src/**/*.tsx', "src/**/*.ts"],
8+
documents: ['src/**/*.tsx', "src/**/*.ts", '!src/**/*DpQuery.ts'],
99
ignoreNoDocuments: true,
1010
generates: {
11-
'./src/graphql/': {
11+
'./src/graphql/poco/': {
1212
preset: 'client',
1313
config: {
1414
documentMode: 'string'
1515
}
1616
},
17-
'./schema.graphql': {
17+
'./src/graphql/poco/schema.graphql': {
1818
plugins: ['schema-ast'],
1919
config: {
2020
includeDirectives: true

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"format": "prettier --write src",
1212
"check-format": "prettier --check src",
1313
"preview": "vite preview",
14-
"codegen": "npm run codegen:poco",
14+
"codegen": "npm run codegen:poco && npm run codegen:dataprotector",
1515
"watch:codegen": "npm run watch:codegen:poco",
1616
"codegen:poco": "graphql-codegen --config codegenPoco.ts",
17+
"codegen:dataprotector": "graphql-codegen --config codegenDataprotector.ts",
1718
"watch:codegen:poco": "graphql-codegen --config codegenPoco.ts --watch"
1819
},
1920
"dependencies": {

0 commit comments

Comments
 (0)