-
Notifications
You must be signed in to change notification settings - Fork 45
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: add operation alias support #71
Conversation
794e66b
to
6c18e53
Compare
Thanks for the contribution. Was wondering if following notation would work better and keep the API simpler:
Let me know what you think. |
Agree! I will update my pr to reflect it |
Should work like so: Without alias:
With alias:
|
6c18e53
to
16b9ad9
Compare
@atulmy I have updated the code to match the proposed notation |
src/IQueryBuilderOptions.ts
Outdated
interface IQueryBuilderOptions { | ||
operation: string /* Operation name */; | ||
operation: string | IOperation /* Operation name */; | ||
alias?: string; |
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.
We can do away with alias
key here?
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.
We can, forgot to remove it
Also add your info in Readme https://github.com/atulmy/gql-query-builder#contributors |
16b9ad9
to
a98b7f9
Compare
Done |
Thank you. What is the publish process? Can I expect a release today? |
Adding support for aliases, as per: https://graphql.org/learn/queries/#aliases