From 4d75f0971244e7e4e90ce4eff771cbde7c348ca3 Mon Sep 17 00:00:00 2001 From: Steven Barker Date: Tue, 25 Jun 2024 23:57:06 +1200 Subject: [PATCH] fix error locations bug --- .../kotlin/graphql/nadel/tests/next/NadelIntegrationTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/test/kotlin/graphql/nadel/tests/next/NadelIntegrationTest.kt b/test/src/test/kotlin/graphql/nadel/tests/next/NadelIntegrationTest.kt index c696c7361..81b11d02e 100644 --- a/test/src/test/kotlin/graphql/nadel/tests/next/NadelIntegrationTest.kt +++ b/test/src/test/kotlin/graphql/nadel/tests/next/NadelIntegrationTest.kt @@ -126,13 +126,13 @@ abstract class NadelIntegrationTest( // Maybe this won't hold out longer term, but e.g. it's ok for the deferred errors to add a path assertJsonEquals( expected = mapOf( - "errors" to (noDeferResultMap["errors"] as List>)?.map { errorMap -> + "errors" to (noDeferResultMap["errors"] as? List>)?.map { errorMap -> errorMap.filterKeys { it != "locations" } }, "extensions" to noDeferResultMap["extensions"], ), actual = mapOf( - "errors" to (combinedDeferResultMap["errors"] as List>)?.map { errorMap -> + "errors" to (combinedDeferResultMap["errors"] as? List>)?.map { errorMap -> errorMap.filterKeys { it != "locations" } }, "extensions" to combinedDeferResultMap["extensions"],