File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -15,24 +15,22 @@ const schema: Schema = JSON.parse(schemaData);
1515const globalIds = schema . data . __schema . types
1616 . filter ( type => type . kind === 'SCALAR' && type . name . endsWith ( 'ID' ) )
1717
18- const scalarConfig = {
19- scalars : {
20- JSON : {
21- input : 'any' ,
22- output : 'any' ,
23- } ,
24- Time : {
25- input : 'string' ,
26- output : 'string' ,
27- }
18+ const scalars = {
19+ JSON : {
20+ input : 'any' ,
21+ output : 'any' ,
22+ } ,
23+ Time : {
24+ input : 'string' ,
25+ output : 'string' ,
2826 }
2927}
3028
3129
3230globalIds . forEach ( type => {
33- const typeConfig = `\`gid://sagittarius/${ type . name } /\${number}\``
31+ const typeConfig = `\`gid://sagittarius/${ type . name . replace ( / I D $ / , '' ) } /\${number}\``
3432
35- scalarConfig . scalars [ type . name ] = {
33+ scalars [ type . name ] = {
3634 input : typeConfig ,
3735 output : typeConfig ,
3836 } ;
@@ -47,7 +45,7 @@ const config: CodegenConfig = {
4745 "typescript"
4846 ] ,
4947 config : {
50- ... scalarConfig ,
48+ scalars ,
5149 strictScalars : true ,
5250 declarationKind : 'interface' ,
5351 }
You can’t perform that action at this time.
0 commit comments