mirror of
https://github.com/atulmy/gql-query-builder.git
synced 2026-04-25 23:55:55 +03:00
[PR #6] [MERGED] Generalize API #142
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gql-query-builder#142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/atulmy/gql-query-builder/pull/6
Author: @bebraw
Created: 3/14/2019
Status: ✅ Merged
Merged: 3/14/2019
Merged by: @atulmy
Base:
master← Head:feat-generalize📝 Commits (7)
cf51ae9refactor: Separate API into mutation/queryd29719bfeat: Add queries/mutations generators01a0e63docs: Update readme6adac9brefactor: Shrink API to query/mutation0270a04fix: Fix "main"4123c87fix: Drop empty commit from pre-versionfc8c219refactor: Simplify Jest setup📊 Changes
5 files changed (+211 additions, -108 deletions)
View changed files
📝
README.md(+29 -45)➖
jest.config.js(+0 -28)📝
package.json(+7 -3)📝
src/index.test.ts(+75 -15)📝
src/index.ts(+100 -17)📄 Description
I encoded operation type to the method name (i.e.
query/mutation) and generalized the implementation to supportqueriesandmutations. I added these methods to avoid ambiguity in typing.If you prefer
query([<options>])kind of approach, that's feasible too. I suppose we would drop the two new methods then and fold them into this scheme.Let me know what you think. Internally it's flexible so it's not a big deal to change the external API.
Closes #4.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.