File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,16 +140,21 @@ export abstract class ProjectCommand extends Command {
140140 }
141141
142142 if ( flags . localSchemaFile ) {
143- config . setDefaults ( {
144- client : {
143+ if ( isClientConfig ( config ) ) {
144+ config . setDefaults ( {
145+ client : {
146+ service : {
147+ localSchemaFile : flags . localSchemaFile
148+ }
149+ }
150+ } ) ;
151+ } else if ( isServiceConfig ( config ) ) {
152+ config . setDefaults ( {
145153 service : {
146154 localSchemaFile : flags . localSchemaFile
147155 }
148- } ,
149- service : {
150- localSchemaFile : flags . localSchemaFile
151- }
152- } ) ;
156+ } ) ;
157+ }
153158 }
154159
155160 // load per command type defaults;
@@ -161,7 +166,11 @@ export abstract class ProjectCommand extends Command {
161166 return { config, filepath, isEmpty } ;
162167 }
163168
164- protected createService ( config : ApolloConfig , filepath : string , flags : any ) {
169+ protected createService (
170+ config : ApolloConfig ,
171+ filepath : string ,
172+ flags : Flags
173+ ) {
165174 const loadingHandler = new OclifLoadingHandler ( this ) ;
166175 const rootURI = `file://${ parse ( filepath ) . dir } ` ;
167176 const clientIdentity = {
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ export default class Generate extends ClientCommand {
4545 required : true
4646 } ) ,
4747 localSchemaFile : flags . string ( {
48- description : "Path to your local GraphQL schema file"
48+ description :
49+ "Path to your local GraphQL schema file (introspection result or SDL)"
4950 } ) ,
5051 addTypename : flags . boolean ( {
5152 description : "Automatically add __typename to your queries" ,
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ export default class ServicePush extends ProjectCommand {
1616 default : "current"
1717 } ) ,
1818 localSchemaFile : flags . string ( {
19- description : "Path to your local GraphQL schema file"
19+ description :
20+ "Path to your local GraphQL schema file (introspection result or SDL)"
2021 } )
2122 } ;
2223
You can’t perform that action at this time.
0 commit comments