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

refactor: remove unused async keywords #163

Merged
merged 3 commits into from
May 28, 2020

Conversation

ultrox
Copy link
Contributor

@ultrox ultrox commented May 26, 2020

When func. was refactored last time it returned resolved promise, now it returns
Promise, hense async not needed since no await is used anywhere inside
the body.

Here is reference to when async was needed
https://github.com/prisma-labs/graphql-request/blame/fcb46735ff6f825090d9327bc9e2e69e12abaf79/src/index.ts#L49

When func. was refactored last time it returned resolved promise, now it returns
Promise, hense async not needed since no await is used anywhere inside
the body.

Here is reference to when async was needed
https://github.com/prisma-labs/graphql-request/blame/fcb46735ff6f825090d9327bc9e2e69e12abaf79/src/index.ts#L49
@andykenward
Copy link
Contributor

Could we not also remove the async on L97 & L107 ?

@ultrox ultrox changed the title refactor: remove async from getResult refactor: remove forgoton async keywords May 27, 2020
@ultrox ultrox changed the title refactor: remove forgoton async keywords refactor: remove forgotten async keywords May 27, 2020
Copy link
Owner

@jasonkuhrt jasonkuhrt left a comment

Choose a reason for hiding this comment

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

Thanks @ultrox

@jasonkuhrt jasonkuhrt changed the title refactor: remove forgotten async keywords refactor: remove unused async keywords May 28, 2020
@jasonkuhrt jasonkuhrt merged commit d09a567 into jasonkuhrt:master May 28, 2020
@schickling
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

4 participants