# MergeType

Merge type used to associate the source API.

- Source: [`aws-appsync/lib/source-api-association.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appsync/lib/source-api-association.ts#L15)
- Type last changed: v2.94.0 · 1 Sep 2023

## Example

```ts
import * as cdk from 'aws-cdk-lib';

// first source API
const firstApi = new appsync.GraphqlApi(this, 'FirstSourceAPI', {
  name: 'FirstSourceAPI',
  definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-1.graphql')),
});

// second source API
const secondApi = new appsync.GraphqlApi(this, 'SecondSourceAPI', {
  name: 'SecondSourceAPI',
  definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-2.graphql')),
});

// Merged API
const mergedApi = new appsync.GraphqlApi(this, 'MergedAPI', {
  name: 'MergedAPI',
  definition: appsync.Definition.fromSourceApis({
    sourceApis: [
      {
        sourceApi: firstApi,
        mergeType: appsync.MergeType.MANUAL_MERGE,
      },
      {
        sourceApi: secondApi,
        mergeType: appsync.MergeType.AUTO_MERGE,
      }
    ],
  }),
});
```

## Members

| Member | Description |
| --- | --- |
| `MANUAL_MERGE` | Manual merge. |
| `AUTO_MERGE` | Auto merge. |

## Referenced by

- [`SourceApi`](/v2/docs/aws-cdk-lib.aws_appsync.SourceApi).mergeType
- [`SourceApiAssociation`](/v2/docs/aws-cdk-lib.aws_appsync.SourceApiAssociation).mergeType
- [`SourceApiAssociationProps`](/v2/docs/aws-cdk-lib.aws_appsync.SourceApiAssociationProps).mergeType
