[PR #53] [MERGED] Add support for invoking mutations nested under other fields #163

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

📋 Pull Request Information

Original PR: https://github.com/atulmy/gql-query-builder/pull/53
Author: @airhorns
Created: 12/4/2020
Status: Merged
Merged: 12/4/2020
Merged by: @atulmy

Base: masterHead: nested-mutations


📝 Commits (1)

  • ec36fea Add support for invoking mutations nested under other fields

📊 Changes

2 files changed (+98 additions, -23 deletions)

View changed files

📝 src/adapters/DefaultMutationAdapter.ts (+11 -23)
📝 src/index.test.ts (+87 -0)

📄 Description

Just like GraphQL queries can have operations at any level, so can mutations! This adds support that the DefaultQueryAdapter already has to the DefaultMutationAdapter for executing mutations nested under other fields. See the tests for some examples.

One more thing I could maybe do is factor out some of the shared code between the adapters into Utils, but I wasn't really sure what is supposed to be shared vs not. Happy to change it up if you'd like @atulmy !


🔄 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/53 **Author:** [@airhorns](https://github.com/airhorns) **Created:** 12/4/2020 **Status:** ✅ Merged **Merged:** 12/4/2020 **Merged by:** [@atulmy](https://github.com/atulmy) **Base:** `master` ← **Head:** `nested-mutations` --- ### 📝 Commits (1) - [`ec36fea`](https://github.com/atulmy/gql-query-builder/commit/ec36fea1f9f6521e90b2562fbc876e43ab11d7d5) Add support for invoking mutations nested under other fields ### 📊 Changes **2 files changed** (+98 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/adapters/DefaultMutationAdapter.ts` (+11 -23) 📝 `src/index.test.ts` (+87 -0) </details> ### 📄 Description Just like GraphQL queries can have operations at any level, so can mutations! This adds support that the `DefaultQueryAdapter` already has to the `DefaultMutationAdapter` for executing mutations nested under other fields. See the tests for some examples. One more thing I could maybe do is factor out some of the shared code between the adapters into `Utils`, but I wasn't really sure what is supposed to be shared vs not. Happy to change it up if you'd like @atulmy ! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 11:39:04 +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#163
No description provided.