-
Notifications
You must be signed in to change notification settings - Fork 365
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: allow multiple operation names in graph:hander #4978
Conversation
📊 Benchmark resultsComparing with 2d4b68c Package size: 222 MB(no change)
Legend
|
}) | ||
/* eslint-disable fp/no-loops */ | ||
for (const operationName of operationNames) { | ||
await generateHandlerByOperationName({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any async behaviour in generateHandlerByOperationName
, so do you need to await
here? And if not, you could use a forEach
and avoid disabling the ESLint rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, @eduardoboucas . All of the generateHandler
need to be async now (since they're no longer pure functions) - @dwwoelfel is this PR missing some of the upstream changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eduardoboucas Whenever Sean's submits his PR for https://github.com/netlify/cli/compare/sg/graph-async-handler-gen, generateHandlerByOperationName
will be async and the await
will be necessary.
I think it's fine to merge this now and not make his PR a dependency on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwwoelfel I'm fine to merge as-is if you want to follow up with the other changes separately.
@dwwoelfel Async change PR is at https://github.com/netlify/cli/pull/4984/files |
Summary
Allows multiple operation names to be specified in
graph:handler
, e.g.ntl graph:handler --codegen ns/handler OpA OpB
.Still supports showing a list of operations to select from if no operation name is provided.