File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ function createInputObjectDefaultValueCircularRefsValidator(
812
812
): void {
813
813
// Start with an empty object as a way to visit every field in this input
814
814
// object type and apply every default value.
815
- return detectValueDefaultValueCycle(inputObj, {} );
815
+ return detectValueDefaultValueCycle(inputObj, Object.create(null) );
816
816
};
817
817
818
818
function detectValueDefaultValueCycle(
@@ -910,7 +910,7 @@ function createInputObjectDefaultValueCircularRefsValidator(
910
910
911
911
// Check to see if there is cycle.
912
912
const cycleIndex = fieldPathIndex[fieldStr];
913
- if (cycleIndex !== undefined && cycleIndex > 0 ) {
913
+ if (cycleIndex !== undefined) {
914
914
context.reportError(
915
915
`Invalid circular reference. The default value of Input Object field ${fieldStr} references itself${
916
916
cycleIndex < fieldPath.length
You can’t perform that action at this time.
0 commit comments