New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/wrap

Package Overview
Dependencies
Maintainers
4
Versions
1769
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/wrap - npm Package Compare versions

Comparing version 10.0.28-alpha-055865b536b3964addc4315e6716c386f25fcfdc to 10.0.28-alpha-485484826331d137253cd2eace6cd5d798629976

70

CHANGELOG.md
# @graphql-tools/wrap
## 10.0.28-alpha-055865b536b3964addc4315e6716c386f25fcfdc
## 10.0.28-alpha-485484826331d137253cd2eace6cd5d798629976
### Patch Changes
- Updated dependencies [[`e8878e6`](https://github.com/graphql-hive/gateway/commit/e8878e64f4cd1ea558f9ae1848b2e315883294cd)]:
- @graphql-tools/delegate@10.2.10-alpha-055865b536b3964addc4315e6716c386f25fcfdc
- [#472](https://github.com/graphql-hive/gateway/pull/472) [`4854848`](https://github.com/graphql-hive/gateway/commit/485484826331d137253cd2eace6cd5d798629976) Thanks [@ardatan](https://github.com/ardatan)! - `RenameObjectFieldArguments` should transform the passed `args` in `delegationContext`.
When a subschema's a root field argument is renamed, the passed arguments should be also transformed;
```graphql
type Query {
# This is the original field
book(book_id: ID): [Book]
}
type Book {
id: ID
title: String
}
```
When the subschema above is transformed to;
```graphql
type Query {
# This is the transformed field
book(bookId: ID): [Book]
}
type Book {
id: ID
title: String
}
```
The following call should be transformed;
```ts
delegateToSchema({
schema: {
schema,
transforms: [
new RenameObjectFieldArguments((typeName, fieldName, argName) => {
if (
typeName === 'Query' &&
fieldName === 'book' &&
argName === 'book_id'
) {
return 'bookId';
}
return argName;
}),
],
},
operation: 'query',
fieldName: 'book',
args: {
bookId: '1',
},
});
```
To this query;
```graphql
{
book(book_id: "1") {
# ...
}
}
```
## 10.0.27

@@ -11,0 +75,0 @@

4

package.json
{
"name": "@graphql-tools/wrap",
"version": "10.0.28-alpha-055865b536b3964addc4315e6716c386f25fcfdc",
"version": "10.0.28-alpha-485484826331d137253cd2eace6cd5d798629976",
"type": "module",

@@ -41,3 +41,3 @@ "description": "A set of utils for faster development of GraphQL tools",

"dependencies": {
"@graphql-tools/delegate": "10.2.10-alpha-055865b536b3964addc4315e6716c386f25fcfdc",
"@graphql-tools/delegate": "^10.2.9",
"@graphql-tools/schema": "^10.0.11",

@@ -44,0 +44,0 @@ "@graphql-tools/utils": "^10.7.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc