This is an automated email from the ASF dual-hosted git repository.

andysch pushed a commit to branch issue/SLING-10900-201
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-graphql-core.git

commit 0cea3d01363af2ce7d0b73f0e7ee83b85870c352
Author: Andreas Schaefer <[email protected]>
AuthorDate: Wed Feb 15 12:45:52 2023 -0800

    SLING-10900 - Updated to latest graphql-java
---
 pom.xml                                                        | 10 ++++++++--
 .../graphql/core/engine/DefaultQueryExecutorLoggingTest.java   |  8 +++++++-
 .../sling/graphql/core/engine/DefaultQueryExecutorTest.java    |  4 +++-
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index a20a44d..9b35aa2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,14 +121,20 @@
     <dependency>
       <groupId>com.graphql-java</groupId>
       <artifactId>graphql-java</artifactId>
-      <version>17.4</version>
+      <version>20.0</version>
       <scope>provided</scope>
     </dependency>
     <!-- The version 3.1.0, 3.1.1 are not valid Maven Bundles and so some IT 
tests fail -->
     <dependency>
       <groupId>com.graphql-java</groupId>
       <artifactId>java-dataloader</artifactId>
-      <version>3.1.4</version>
+      <version>3.2.0</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr4-runtime</artifactId>
+      <version>4.7.1</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
diff --git 
a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorLoggingTest.java
 
b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorLoggingTest.java
index dd8aeca..6254f53 100644
--- 
a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorLoggingTest.java
+++ 
b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorLoggingTest.java
@@ -83,8 +83,14 @@ public class DefaultQueryExecutorLoggingTest extends 
ResourceQueryTestBase {
             "Query failed for Resource " + resource.getPath(),
             "query=" + invalidQuery,
             "Errors:Error: type=InvalidSyntax",
+// 15.0
 //            "message=Invalid Syntax : offending token 'INVALID' at line 1 
column 1",
-            "message=Invalid Syntax : token recognition error at: '4ec' at 
line 1 column 9",
+// 17.4
+//            "message=Invalid Syntax : token recognition error at: '4ec' at 
line 1 column 9",
+// 20.0
+//            "message=Invalid syntax with ANTLR error 'token recognition 
error at: '4ec'' at line 1 column 9",
+// 20.0 Master branch 2/15/23
+                "message=Invalid syntax with offending token 'INVALID' at line 
1 column 1",
             String.format("selectors=%s", Arrays.toString(selectors))
         );
     }
diff --git 
a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
 
b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
index 07c5418..6af79a8 100644
--- 
a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
+++ 
b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
@@ -165,7 +165,9 @@ public class DefaultQueryExecutorTest extends 
ResourceQueryTestBase {
         ValidationResult result = queryExecutor.validate(stmt, 
Collections.emptyMap(), resource, new String[] {});
         assertFalse(result.isValid());
         String errors = String.join("\n", result.getErrors());
-        assertTrue(errors.contains("Error: type=ValidationError; 
message=Validation error of type FieldUndefined: Field 'currentRsrc' in type 
'Query' is undefined @ 'currentRsrc'; location=1,3;"));
+// 15.0 & 17.4
+//        assertTrue("Wrong response, found errors: '" + errors + "'", 
errors.contains("Error: type=ValidationError; message=Validation error of type 
FieldUndefined: Field 'currentRsrc' in type 'Query' is undefined @ 
'currentRsrc'; location=1,3;"));
+        assertTrue("Wrong response, found errors: '" + errors + "'", 
errors.contains("Error: type=ValidationError; message=Validation error 
(FieldUndefined@[currentRsrc]) : Field 'currentRsrc' in type 'Query' is 
undefined; location=1,3;"));
     }
 
     @Test

Reply via email to