Skip to content

Commit ea1d948

Browse files
authoredDec 6, 2024··
Fix network selection bug (#1783)
* fix network bug * hide subgraph option
1 parent a23d65a commit ea1d948

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed
 

‎.changeset/old-dryers-judge.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
Fix bug with network selection

‎packages/cli/src/commands/codegen.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class CodegenCommand extends Command {
4343
summary: 'IPFS node to use for fetching subgraph data.',
4444
char: 'i',
4545
default: DEFAULT_IPFS_URL,
46-
hidden: true
46+
hidden: true,
4747
}),
4848
'uncrashable-config': Flags.file({
4949
summary: 'Directory for uncrashable config.',

‎packages/cli/src/commands/init.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default class InitCommand extends Command {
159159
summary: 'IPFS node to use for fetching subgraph data.',
160160
char: 'i',
161161
default: DEFAULT_IPFS_URL,
162-
hidden: true
162+
hidden: true,
163163
}),
164164
};
165165

@@ -565,7 +565,8 @@ async function processInitForm(
565565
type: 'input',
566566
name: 'source',
567567
message: sourceMessage,
568-
skip: () => !isComposedSubgraph,
568+
skip: () =>
569+
initFromExample !== undefined || !protocolInstance.hasContract() || isSubstreams,
569570
initial: initContract,
570571
validate: async (value: string) => {
571572
if (isComposedSubgraph) {

‎packages/cli/src/protocols/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default class Protocol {
9292
near: ['near'],
9393
cosmos: ['cosmos'],
9494
substreams: ['substreams'],
95-
subgraph: ['subgraph'],
95+
// subgraph: ['subgraph'],
9696
}) as immutable.Collection<ProtocolName, string[]>;
9797
}
9898

0 commit comments

Comments
 (0)
Please sign in to comment.