11import type { CodegenConfig } from '@graphql-codegen/cli'
22
33const config : CodegenConfig = {
4- schema : 'https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest' ,
5- documents : [ 'src/**/*.graphql' ] ,
6- ignoreNoDocuments : true ,
74 generates : {
8- './src/graphql/' : {
5+ // First Graph (existing SSV Network)
6+ './src/graphql/ssv/' : {
7+ schema : 'https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest' ,
8+ documents : [ 'src/**/*.ssv.graphql' ] ,
9+ preset : 'client' ,
10+ config : {
11+ scalars : {
12+ BigInt : 'string' , // or 'string' if you prefer string representation
13+ BigDecimal : 'string' ,
14+ Bytes : 'Address' ,
15+ Account : 'Address' ,
16+ } ,
17+ additionalImports : [ 'import { type Address } from "viem"' ] ,
18+ skipTypename : true ,
19+ } ,
20+ plugins : [
21+ {
22+ add : {
23+ content : "import { type Address } from 'viem';" ,
24+ } ,
25+ } ,
26+ ] ,
27+ // plugins: ['typescript', 'typescript-operations', 'typescript-graphql-request'],
28+ } ,
29+ // Second Graph (new one)
30+ './src/graphql/bam/' : {
31+ schema : 'https://api.studio.thegraph.com/query/53804/ssv-bapps-subgraph/version/latest' ,
32+ documents : [ 'src/**/*.bam.graphql' ] ,
933 preset : 'client' ,
1034 config : {
1135 scalars : {
@@ -24,10 +48,17 @@ const config: CodegenConfig = {
2448 } ,
2549 } ,
2650 ] ,
27-
2851 // plugins: ['typescript', 'typescript-operations', 'typescript-graphql-request'],
2952 } ,
30- './schema.graphql' : {
53+ './schema.ssv.graphql' : {
54+ schema : 'https://api.studio.thegraph.com/query/71118/ssv-network-ethereum/version/latest' ,
55+ plugins : [ 'schema-ast' ] ,
56+ config : {
57+ includeDirectives : true ,
58+ } ,
59+ } ,
60+ './schema.bam.graphql' : {
61+ schema : 'https://api.studio.thegraph.com/query/53804/ssv-bapps-subgraph/version/latest' ,
3162 plugins : [ 'schema-ast' ] ,
3263 config : {
3364 includeDirectives : true ,
0 commit comments