@@ -24,7 +24,7 @@ import AddCommand from './add';
24
24
const protocolChoices = Array . from ( Protocol . availableProtocols ( ) . keys ( ) ) ;
25
25
const availableNetworks = Protocol . availableNetworks ( ) ;
26
26
27
- const DEFAULT_EXAMPLE_SUBGRAPH = 'ethereum/ gravatar' ;
27
+ const DEFAULT_EXAMPLE_SUBGRAPH = 'ethereum- gravatar' ;
28
28
29
29
export default class InitCommand extends Command {
30
30
static description = 'Creates a new subgraph with basic scaffolding.' ;
@@ -824,15 +824,18 @@ async function initSubgraphFromExample(
824
824
const tmpDir = fs . mkdtempSync ( prefix ) ;
825
825
826
826
try {
827
- await system . run ( `git clone http ://github.com/graphprotocol/example-subgraphs ${ tmpDir } ` ) ;
827
+ await system . run ( `git clone https ://github.com/graphprotocol/graph-tooling ${ tmpDir } ` ) ;
828
828
829
829
// If an example is not specified, use the default one
830
830
if ( fromExample === undefined || fromExample === true ) {
831
831
fromExample = DEFAULT_EXAMPLE_SUBGRAPH ;
832
832
}
833
+ // Legacy purposes when everything existed in examples repo
834
+ if ( fromExample === 'ethereum/gravatar' ) {
835
+ fromExample = DEFAULT_EXAMPLE_SUBGRAPH ;
836
+ }
833
837
834
- const exampleSubgraphPath = path . join ( tmpDir , String ( fromExample ) ) ;
835
-
838
+ const exampleSubgraphPath = path . join ( tmpDir , 'examples' , String ( fromExample ) ) ;
836
839
if ( ! filesystem . exists ( exampleSubgraphPath ) ) {
837
840
return { result : false , error : `Example not found: ${ fromExample } ` } ;
838
841
}
0 commit comments