Skip to content

Commit d2b263d

Browse files
committed
Changeset
1 parent 68f5bc2 commit d2b263d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/dark-crabs-glow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-tools/merge': patch
3+
---
4+
5+
Prevent prototype polluting assignment

packages/merge/src/merge-resolvers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export function mergeResolvers<TSource, TContext>(
7272
if (options?.exclusions) {
7373
for (const exclusion of options.exclusions) {
7474
const [typeName, fieldName] = exclusion.split('.');
75-
if (['__proto__', 'constructor', 'prototype'].includes(typeName) || ['__proto__', 'constructor', 'prototype'].includes(fieldName)) {
75+
if (
76+
['__proto__', 'constructor', 'prototype'].includes(typeName) ||
77+
['__proto__', 'constructor', 'prototype'].includes(fieldName)
78+
) {
7679
continue;
7780
}
7881
if (!fieldName || fieldName === '*') {

0 commit comments

Comments
 (0)