[PR #11] [MERGED] Adapter support #149

Closed
opened 2026-03-15 11:38:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/atulmy/gql-query-builder/pull/11
Author: @toadkicker
Created: 5/9/2019
Status: Merged
Merged: 6/11/2019
Merged by: @atulmy

Base: masterHead: appsync_support


📝 Commits (10+)

  • 7140fbf update dependencies (9 vunerable)
  • 5f843ac work in progress
  • 5962699 mid flight checkin
  • 5f996f8 mid flight checkin
  • 5138c2f passed tests
  • 0dcb6fd added test/support for adapter argument vs including it in the QueryBuilderOptions. Now we can just pass in the adapter class as a second optional argument for query/mutation builder.
  • 2e4e8fe Merge branch 'master' into appsync_support
  • 2244e93 added some documentation about adapters and comments in the files
  • 07ee16e fix link to to default adapters
  • 3f00375 added default appsync mutation adapter

📊 Changes

16 files changed (+1009 additions, -217 deletions)

View changed files

📝 README.md (+133 -13)
src/Fields.ts (+8 -0)
src/IQueryBuilderOptions.ts (+13 -0)
src/OperationType.ts (+7 -0)
src/Utils.ts (+72 -0)
src/adapters/DefaultAppSyncMutationAdapter.ts (+104 -0)
src/adapters/DefaultAppSyncQueryAdapter.ts (+121 -0)
src/adapters/DefaultMutationAdapter.ts (+112 -0)
src/adapters/DefaultQueryAdapter.ts (+119 -0)
src/adapters/DefaultSubscriptionAdapter.ts (+106 -0)
src/adapters/IMutationAdapter.ts (+12 -0)
src/adapters/IQueryAdapter.ts (+12 -0)
src/adapters/ISubscriptionAdapter.ts (+12 -0)
src/adapters/index.ts (+4 -0)
📝 src/index.test.ts (+109 -28)
📝 src/index.ts (+65 -176)

📄 Description

Hello,

I wanted to thank you first for building this great library. I've been hacking on it this week to make it much more flexible and support many kinds of graphql implementations. In order to achieve that, I started introducing an adapter pattern. This means developers can introduce their own query building tool provided they implement the appropriate interfaces. Overall my goal is to introduce this library as a dependency in vuex-orm's plugin-graphql ecosystem while keeping this library independent. Looking forward to collaborating on it and making this the defacto choice for building graphql queries.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/atulmy/gql-query-builder/pull/11 **Author:** [@toadkicker](https://github.com/toadkicker) **Created:** 5/9/2019 **Status:** ✅ Merged **Merged:** 6/11/2019 **Merged by:** [@atulmy](https://github.com/atulmy) **Base:** `master` ← **Head:** `appsync_support` --- ### 📝 Commits (10+) - [`7140fbf`](https://github.com/atulmy/gql-query-builder/commit/7140fbf4f85d2af1f9344103d2e5a1198e8afe8e) update dependencies (9 vunerable) - [`5f843ac`](https://github.com/atulmy/gql-query-builder/commit/5f843ac99da87477052ab0e9a05d4cefb11c1c4b) work in progress - [`5962699`](https://github.com/atulmy/gql-query-builder/commit/5962699ecf4e487aa41af73eab7fa3b1e52c46c2) mid flight checkin - [`5f996f8`](https://github.com/atulmy/gql-query-builder/commit/5f996f84cce94c5e002c4897185059fcc71d99ab) mid flight checkin - [`5138c2f`](https://github.com/atulmy/gql-query-builder/commit/5138c2fbe5d0fefe22fd07288f08595a3c6268c5) passed tests - [`0dcb6fd`](https://github.com/atulmy/gql-query-builder/commit/0dcb6fd69d81f4633148dfd61555d3ca135fc9e6) added test/support for adapter argument vs including it in the QueryBuilderOptions. Now we can just pass in the adapter class as a second optional argument for query/mutation builder. - [`2e4e8fe`](https://github.com/atulmy/gql-query-builder/commit/2e4e8feaf9bc118f35eb0a3cec632344195a8bfa) Merge branch 'master' into appsync_support - [`2244e93`](https://github.com/atulmy/gql-query-builder/commit/2244e93ff851ba38b56709e14b88ef5b864f7e96) added some documentation about adapters and comments in the files - [`07ee16e`](https://github.com/atulmy/gql-query-builder/commit/07ee16e359c2b0d6596b767ec5e4b0f57c76f216) fix link to to default adapters - [`3f00375`](https://github.com/atulmy/gql-query-builder/commit/3f0037530a7e676263e8c56802e0cfb30dec8388) added default appsync mutation adapter ### 📊 Changes **16 files changed** (+1009 additions, -217 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+133 -13) ➕ `src/Fields.ts` (+8 -0) ➕ `src/IQueryBuilderOptions.ts` (+13 -0) ➕ `src/OperationType.ts` (+7 -0) ➕ `src/Utils.ts` (+72 -0) ➕ `src/adapters/DefaultAppSyncMutationAdapter.ts` (+104 -0) ➕ `src/adapters/DefaultAppSyncQueryAdapter.ts` (+121 -0) ➕ `src/adapters/DefaultMutationAdapter.ts` (+112 -0) ➕ `src/adapters/DefaultQueryAdapter.ts` (+119 -0) ➕ `src/adapters/DefaultSubscriptionAdapter.ts` (+106 -0) ➕ `src/adapters/IMutationAdapter.ts` (+12 -0) ➕ `src/adapters/IQueryAdapter.ts` (+12 -0) ➕ `src/adapters/ISubscriptionAdapter.ts` (+12 -0) ➕ `src/adapters/index.ts` (+4 -0) 📝 `src/index.test.ts` (+109 -28) 📝 `src/index.ts` (+65 -176) </details> ### 📄 Description Hello, I wanted to thank you first for building this great library. I've been hacking on it this week to make it much more flexible and support many kinds of graphql implementations. In order to achieve that, I started introducing an adapter pattern. This means developers can introduce their own query building tool provided they implement the appropriate interfaces. Overall my goal is to introduce this library as a dependency in `vuex-orm`'s `plugin-graphql` ecosystem while keeping this library independent. Looking forward to collaborating on it and making this the defacto choice for building graphql queries. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:38:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#149
No description provided.