diff --git a/packages/@aws-cdk/aws-appsync/lib/private.ts b/packages/@aws-cdk/aws-appsync/lib/private.ts index f31ab439bccc8..9e2bd335bed1e 100644 --- a/packages/@aws-cdk/aws-appsync/lib/private.ts +++ b/packages/@aws-cdk/aws-appsync/lib/private.ts @@ -202,7 +202,7 @@ function concatAndDedup(left: T[], right: T[]): T[] { function generateInterfaces(interfaceTypes?: InterfaceType[]): string { if (!interfaceTypes || interfaceTypes.length === 0) return ''; return interfaceTypes.reduce((acc, interfaceType) => - `${acc} ${interfaceType.name},`, ' implements').slice(0, -1); + `${acc} ${interfaceType.name} &`, ' implements').slice(0, -2); } /** diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts index 77da20a58ca4c..0a6c45d24fd85 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts @@ -61,7 +61,7 @@ describe('testing Object Type properties', () => { api.addType(objectTest); const gql_interface = 'interface baseTest {\n id: ID\n}\ninterface anotherTest {\n id2: ID\n}\n'; - const gql_object = 'type objectTest implements anotherTest, baseTest {\n id3: ID\n id2: ID\n id: ID\n}\n'; + const gql_object = 'type objectTest implements anotherTest & baseTest {\n id3: ID\n id2: ID\n id: ID\n}\n'; const out = `${gql_interface}${gql_object}`; // THEN