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) {
93
93
94
94
generateEslintIgnore ( context ) ;
95
95
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 } ` ) ;
97
97
}
98
98
99
99
async function validateSchema ( context ) {
Original file line number Diff line number Diff line change @@ -220,9 +220,11 @@ const generateDartPreset = (
220
220
export const preset : Types . OutputPreset < AppSyncModelCodeGenPresetConfig > = {
221
221
buildGeneratesSection : ( options : Types . PresetFnArgs < AppSyncModelCodeGenPresetConfig > ) : Types . GenerateOptions [ ] => {
222
222
const codeGenTarget = options . config . target ;
223
-
223
+ const typesToSkip : string [ ] = [ 'Query' , 'Mutation' , 'Subscription' ] ;
224
224
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 ( '__' ) ) ,
226
228
) as any ;
227
229
228
230
switch ( codeGenTarget ) {
You can’t perform that action at this time.
0 commit comments