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

appsync-alpha: Add grant methods to IGraphqlApi #23031

Closed
2 tasks
Sevi7 opened this issue Nov 22, 2022 · 2 comments · Fixed by #29086
Closed
2 tasks

appsync-alpha: Add grant methods to IGraphqlApi #23031

Sevi7 opened this issue Nov 22, 2022 · 2 comments · Fixed by #29086
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@Sevi7
Copy link

Sevi7 commented Nov 22, 2022

Describe the feature

Grant methods are available in GraphqlApi but not in IGraphqlApi. So when you import a GraphQL Api you don't have the option to add grants.

Use Case

I have a shared GraphQL Api in one stack that multiple stacks use. So I would like to import it and being able to use grant methods.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.50.0

Environment details (OS name and version, etc.)

macOs

@Sevi7 Sevi7 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2022
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Nov 22, 2022
@peterwoodworth
Copy link
Contributor

This seems like it should be possible to me, the grant methods here shouldn't be dependent on information that can only be found when the construct itself is created I don't think. I might be wrong because I'm not super familiar with this service, but taking a look at the code it didn't appear anything was dependent on something that couldn't be found on an imported GraphqlApi. Thanks for the request!

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2022
@mergify mergify bot closed this as completed in #29086 Feb 28, 2024
mergify bot pushed a commit that referenced this issue Feb 28, 2024
…29086)

### Issue

Closes #23031.

### Reason for this change

The `grantXx` methods are implemented in the `GraphqlApi` class, but it could not be used with an imported graphql api.

### Description of changes

Moved the implementation of the `grantXx` method from the `GraphqlApi` class to the `GraphqlApiBase` class."

### Description of how you validated changes

I've added both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
3 participants