File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
amplify-codegen/src/commands
appsync-modelgen-plugin/src Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ async function generateModels(context) {
9393
9494 generateEslintIgnore ( context ) ;
9595
96- context . print . info ( `Successfully generated models... Generated models can be found in ${ outputPath } ` ) ;
96+ context . print . info ( `Successfully generated models. Generated models can be found in ${ outputPath } ` ) ;
9797}
9898
9999async function validateSchema ( context ) {
Original file line number Diff line number Diff line change @@ -220,9 +220,11 @@ const generateDartPreset = (
220220export const preset : Types . OutputPreset < AppSyncModelCodeGenPresetConfig > = {
221221 buildGeneratesSection : ( options : Types . PresetFnArgs < AppSyncModelCodeGenPresetConfig > ) : Types . GenerateOptions [ ] => {
222222 const codeGenTarget = options . config . target ;
223-
223+ const typesToSkip : string [ ] = [ 'Query' , 'Mutation' , 'Subscription' ] ;
224224 const models : TypeDefinitionNode [ ] = options . schema . definitions . filter (
225- t => t . kind === 'ObjectTypeDefinition' || ( t . kind === 'EnumTypeDefinition' && ! t . name . value . startsWith ( '__' ) ) ,
225+ t =>
226+ ( t . kind === 'ObjectTypeDefinition' && ! typesToSkip . includes ( t . name . value ) ) ||
227+ ( t . kind === 'EnumTypeDefinition' && ! t . name . value . startsWith ( '__' ) ) ,
226228 ) as any ;
227229
228230 switch ( codeGenTarget ) {
You can’t perform that action at this time.
0 commit comments