Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(appsync): HttpDataSource extends BackedDataSource instead of BaseDataSource #11185

Merged
merged 5 commits into from
Nov 10, 2020

Conversation

cm-wada-yusuke
Copy link
Contributor

BackedDataSource make Grantable HttpDataSource. I think this pr allows better use of the iam config: #10171

fixes #11183

@gitpod-io
Copy link

gitpod-io bot commented Oct 29, 2020

Copy link
Contributor

@BryanPan342 BryanPan342 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrArnoldPalmer this LGTM, maybe a test case is needed but other than that im good with it

Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM. TY!

@mergify
Copy link
Contributor

mergify bot commented Nov 10, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 10, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 8d3a397
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 4b4d011 into aws:master Nov 10, 2020
@cm-wada-yusuke cm-wada-yusuke deleted the waddy/fix-httpdatasource branch November 10, 2020 04:47
mergify bot pushed a commit that referenced this pull request Dec 5, 2024
…DataSourceProps` (#32065)

### Reason for this change
Closes #31979.
Replaces #29689.

In #11185, the `HttpDataSource` class was updated to extend `BackedDataSource` instead of `BaseDataSource`, however the `HttpDataSourceProps` type wasn't updated to reflect this change. This PR makes the `HttpDataSourceProps` type reflect the change.

### Description of changes
Makes the `HttpDataSourceProps` type extend `BackedDataSourceProps`, instead of `BaseDataSourceProps`. This means users are able to provide the `serviceRole` prop without getting a type error.

### Description of how you validated changes
The below code snippet no longer gives an incorrect type error when providing the serviceRole, as it did before:
```ts
import * as appsync from "aws-cdk-lib/aws-appsync";
import type { IRole } from "aws-cdk-lib/aws-iam";

declare const myApi: appsync.GraphqlApi;
declare const serviceRole: IRole;

const stepFunctionHttpDataSource = new appsync.HttpDataSource(
    myApi,
    "MyStepFunctionHTTPDataSource",
    {
        api: myApi,
        authorizationConfig: {
            signingRegion: "eu-west-1",
            signingServiceName: "states",
        },
        endpoint: `https://states.eu-west-1.amazonaws.com`,
        name: "StepFunctionHTTPDataSource",
        // Providing the `serviceRole` now correctly DOESN'T throw a type error
        serviceRole,
    }
);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aws-appsync] HttpDataSource should extends BackedDataSource instead of BaseDataSource
4 participants