Skip to content

Commit e1f3cc0

Browse files
authored
chore: fix generate fuel core graphql schema script (#3664)
1 parent 548ba42 commit e1f3cc0

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

.changeset/fluffy-dingos-deliver.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
chore: fix generate fuel core graphql schema script

packages/account/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"scripts": {
4343
"build": "tsup",
4444
"prebuild": "pnpm build:operations",
45-
"build:schema": "tsx ./scripts/generate-fuel-core-schema.mts",
45+
"build:schema": "tsx ./scripts/generate-fuel-core-schema.ts",
4646
"build:operations": "pnpm graphql-codegen",
4747
"postbuild": "tsx ../../scripts/postbuild.ts"
4848
},

packages/account/scripts/generate-fuel-core-schema.mts

-15
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { execSync } from 'child_process';
2+
import { join } from 'path';
3+
4+
import { setupTestProviderAndWallets } from '../src/test-utils/setup-test-provider-and-wallets';
5+
6+
const { error } = console;
7+
8+
const main = async () => {
9+
using launched = await setupTestProviderAndWallets();
10+
11+
const schemaPath = join(__dirname, '..', 'src/providers/fuel-core-schema.graphql');
12+
13+
execSync(
14+
`pnpm get-graphql-schema ${launched.provider.url} > ${schemaPath} && prettier --write ${schemaPath}`
15+
);
16+
};
17+
18+
main().catch(error);

0 commit comments

Comments
 (0)