Skip to content

Commit

Permalink
Fix network selection bug (#1783)
Browse files Browse the repository at this point in the history
* fix network bug

* hide subgraph option
  • Loading branch information
YaroShkvorets authored Dec 6, 2024
1 parent a23d65a commit ea1d948
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/old-dryers-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/graph-cli': patch
---

Fix bug with network selection
2 changes: 1 addition & 1 deletion packages/cli/src/commands/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class CodegenCommand extends Command {
summary: 'IPFS node to use for fetching subgraph data.',
char: 'i',
default: DEFAULT_IPFS_URL,
hidden: true
hidden: true,
}),
'uncrashable-config': Flags.file({
summary: 'Directory for uncrashable config.',
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default class InitCommand extends Command {
summary: 'IPFS node to use for fetching subgraph data.',
char: 'i',
default: DEFAULT_IPFS_URL,
hidden: true
hidden: true,
}),
};

Expand Down Expand Up @@ -565,7 +565,8 @@ async function processInitForm(
type: 'input',
name: 'source',
message: sourceMessage,
skip: () => !isComposedSubgraph,
skip: () =>
initFromExample !== undefined || !protocolInstance.hasContract() || isSubstreams,
initial: initContract,
validate: async (value: string) => {
if (isComposedSubgraph) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/protocols/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class Protocol {
near: ['near'],
cosmos: ['cosmos'],
substreams: ['substreams'],
subgraph: ['subgraph'],
// subgraph: ['subgraph'],
}) as immutable.Collection<ProtocolName, string[]>;
}

Expand Down

0 comments on commit ea1d948

Please sign in to comment.