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

[TS] Include query parameters in typed Cell component props #11737

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented Nov 29, 2024

When i generate any cell that needs an input for it's GQL query, the generated redwood types makes those inputs available as props on the <…Cell> component. So far, so good, yer good 'ole Redwood magic.

While authoring the cell component code however, one needs to manually extend the interfaces to get around typescript errors when accessing those props. This PR changes that.

I'd also suggest improving createCell so all components (not only <Success>) get full type annotations & generics – so one will get best autocompletion on all components out-of-the-box – but that'd probably be a separate PR.

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.

1 participant