Skip to content

Commit

Permalink
wip: check write schema
Browse files Browse the repository at this point in the history
  • Loading branch information
NanezX committed Nov 2, 2023
1 parent 80f2be7 commit 76e9014
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
11 changes: 3 additions & 8 deletions subgraph/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,17 @@ fn main() {
let _ = deploy(config);

// Get the schema from the endpoint
let write_schema = run_cmd(
// "tests/subgraph/query/schema.json",
run_cmd(
"graphql-client",
&[
"introspect-schema",
"--output",
"tests/subgraph/query/schema.json",
"schema.json",
"http://localhost:8000/subgraphs/name/test/test",
],
);

if write_schema {
println!("HERE_1: schema was wrote");
} else {
println!("HERE_2: failed to write schemag");
}

()
}

Expand Down
3 changes: 2 additions & 1 deletion subgraph/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@

ci-test = pkgs.writeShellScriptBin "ci-test" (''
# This build is for generate the schema.json
cargo run build
cargo run build;
ls
cargo test -- --test-threads=1 --nocapture;
'');

Expand Down

0 comments on commit 76e9014

Please sign in to comment.