# SourceApi

Configuration of source API.

- Source: [`aws-appsync/lib/graphqlapi.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts#L348)
- Type last changed: v2.97.0 · 22 Sep 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';

declare const graphqlApi: appsync.GraphqlApi;
const sourceApi: appsync.SourceApi = {
  sourceApi: graphqlApi,

  // the properties below are optional
  description: 'description',
  mergeType: appsync.MergeType.MANUAL_MERGE,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

# graphql_api: appsync.GraphqlApi

source_api = appsync.SourceApi(
    source_api=graphql_api,

    # the properties below are optional
    description="description",
    merge_type=appsync.MergeType.MANUAL_MERGE
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;

GraphqlApi graphqlApi;

SourceApi sourceApi = SourceApi.builder()
        .sourceApi(graphqlApi)

        // the properties below are optional
        .description("description")
        .mergeType(MergeType.MANUAL_MERGE)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;

GraphqlApi graphqlApi;

var sourceApi = new SourceApi {
    SourceApi = graphqlApi,

    // the properties below are optional
    Description = "description",
    MergeType = MergeType.MANUAL_MERGE
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var graphqlApi GraphqlApi

sourceApi := &SourceApi{
	SourceApi: graphqlApi,

	// the properties below are optional
	Description: jsii.String("description"),
	MergeType: awscdk.Aws_appsync.MergeType_MANUAL_MERGE,
}
```

## Properties

- `description`: string — Description of the Source API asssociation.

- `mergeType`: [MergeType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.MergeType.html) — Merging option used to associate the source API to the Merged API.

  **Default:** Auto merge. The merge is triggered automatically when the source API has changed

- `sourceApi`: [IGraphqlApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.IGraphqlApi.html) (required) — Source API that is associated with the merged API.
