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

feat(appsync): add Construct for AppSync HTTP DataSource #8007

Closed
4 of 8 tasks
civilizeddev opened this issue May 15, 2020 · 0 comments · Fixed by #8009
Closed
4 of 8 tasks

feat(appsync): add Construct for AppSync HTTP DataSource #8007

civilizeddev opened this issue May 15, 2020 · 0 comments · Fixed by #8009
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync feature-request A feature should be added or improved. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@civilizeddev
Copy link
Contributor

I implemented a Construct level of HTTP DataSource for appsync.

image

Use Case

Currently aws-appsync module provides these:

  • None
  • DynamoDB
  • Lambda

But not these:

  • HTTP
  • Elastisearch
  • RDS

Proposed Solution

HTTP data source only takes http endpoint. (just extends appsync.BaseDataSource)

image

/**
 * An AppSync datasource backed by a http endpoint
 */
export class HttpDataSource extends appsync.BaseDataSource {
  constructor(scope: cdk.Construct, id: string, props: HttpDataSourceProps) {
    super(scope, id, props, {
      httpConfig: {
        endpoint: props.endpoint,
      },
      type: 'HTTP',
    })
  }
}

Other

And I also added some resolver mapping template examples for HTTP data source:

image
image

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@civilizeddev civilizeddev added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 15, 2020
@SomayaB SomayaB added @aws-cdk/aws-appsync Related to AWS AppSync in-progress This issue is being actively worked on. labels May 15, 2020
@mergify mergify bot closed this as completed in #8009 Jun 12, 2020
mergify bot pushed a commit that referenced this issue Jun 12, 2020
### Commit Message
feat(appsync): add Construct for AppSync HTTP DataSource

* ADD GraphQLApi.addHttpDataSource()
* ADD interface HttpDataSourceProps
* ADD class HttpDataSource

Closes #8007 
### End Commit Message

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync feature-request A feature should be added or improved. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants