diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 44df6387..5593bee3 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -20,7 +20,7 @@ jobs: java-version: 11 distribution: adopt - name: Run Maven build - run: ./mvnw --no-transfer-progress -Dneo4j-graphql-java.integration-tests=true -Dneo4j-graphql-java.generate-test-file-diff=false clean compile test + run: ./mvnw --no-transfer-progress -Dneo4j-graphql-java.integration-tests=true -Dneo4j-graphql-java.generate-test-file-diff=false -Dneo4j-graphql-java.flatten-tests=true clean compile test - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action@v1 if: always() diff --git a/core/src/test/kotlin/org/neo4j/graphql/utils/AsciiDocTestSuite.kt b/core/src/test/kotlin/org/neo4j/graphql/utils/AsciiDocTestSuite.kt index 4e0f2620..84f63a4f 100644 --- a/core/src/test/kotlin/org/neo4j/graphql/utils/AsciiDocTestSuite.kt +++ b/core/src/test/kotlin/org/neo4j/graphql/utils/AsciiDocTestSuite.kt @@ -32,7 +32,20 @@ open class AsciiDocTestSuite( */ private val knownBlocks: MutableList = mutableListOf() - fun generateTests(): Stream = FileParser().parse() + fun generateTests(): Stream { + val stream = FileParser().parse() + return if (FLATTEN_TESTS) flatten(stream, "$fileName:") else stream + } + + private fun flatten(stream: Stream, name: String): Stream { + return stream.flatMap { + when (it) { + is DynamicContainer -> flatten(it.children, "$name[${it.displayName}]") + is DynamicTest -> Stream.of(DynamicTest.dynamicTest("$name[${it.displayName}]", it.executable)) + else -> throw IllegalArgumentException("unknown type ${it.javaClass.name}") + } + } + } class ParsedBlock( val marker: String, @@ -227,6 +240,10 @@ open class AsciiDocTestSuite( } companion object { + /** + * to find broken tests easy by its console output, enable this feature + */ + val FLATTEN_TESTS = System.getProperty("neo4j-graphql-java.flatten-tests", "false") == "true" val GENERATE_TEST_FILE_DIFF = System.getProperty("neo4j-graphql-java.generate-test-file-diff", "true") == "true" val UPDATE_TEST_FILE = System.getProperty("neo4j-graphql-java.update-test-file", "false") == "true" val MAPPER = ObjectMapper() diff --git a/core/src/test/kotlin/org/neo4j/graphql/utils/CypherTestSuite.kt b/core/src/test/kotlin/org/neo4j/graphql/utils/CypherTestSuite.kt index ddbcc892..e25ab0f8 100644 --- a/core/src/test/kotlin/org/neo4j/graphql/utils/CypherTestSuite.kt +++ b/core/src/test/kotlin/org/neo4j/graphql/utils/CypherTestSuite.kt @@ -6,6 +6,7 @@ import graphql.schema.DataFetcher import graphql.schema.DataFetchingEnvironment import graphql.schema.GraphQLSchema import org.assertj.core.api.Assertions +import org.assertj.core.api.InstanceOfAssertFactories import org.junit.jupiter.api.Assumptions import org.junit.jupiter.api.DynamicNode import org.junit.jupiter.api.DynamicTest @@ -14,6 +15,7 @@ import org.neo4j.harness.Neo4j import org.opentest4j.AssertionFailedError import java.util.* import java.util.concurrent.FutureTask +import java.util.function.Consumer import kotlin.streams.toList class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTestSuite( @@ -23,6 +25,7 @@ class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTest GRAPHQL_MARKER, GRAPHQL_VARIABLES_MARKER, GRAPHQL_RESPONSE_MARKER, + GRAPHQL_RESPONSE_IGNORE_ORDER_MARKER, QUERY_CONFIG_MARKER, CYPHER_PARAMS_MARKER, CYPHER_MARKER @@ -48,9 +51,15 @@ class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTest } if (neo4j != null) { val testData = globalBlocks[TEST_DATA_MARKER] - val response = getOrCreateBlock(codeBlocks, GRAPHQL_RESPONSE_MARKER, "GraphQL-Response") + var response = codeBlocks[GRAPHQL_RESPONSE_IGNORE_ORDER_MARKER] + var ignoreOrder = false; + if (response != null) { + ignoreOrder = true; + } else { + response = getOrCreateBlock(codeBlocks, GRAPHQL_RESPONSE_MARKER, "GraphQL-Response") + } if (testData != null && response != null) { - tests.add(integrationTest(title, globalBlocks, codeBlocks, testData, response)) + tests.add(integrationTest(title, globalBlocks, codeBlocks, testData, response, ignoreOrder)) } } @@ -183,7 +192,8 @@ class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTest globalBlocks: Map, codeBlocks: Map, testData: ParsedBlock, - response: ParsedBlock + response: ParsedBlock, + ignoreOrder: Boolean ): DynamicNode = DynamicTest.dynamicTest("Integration Test", response.uri) { val dataFetchingInterceptor = setupDataFetchingInterceptor(testData) val request = codeBlocks[GRAPHQL_MARKER]?.code() @@ -218,7 +228,27 @@ class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTest val actualCode = MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(values) response.adjustedCode = actualCode } - Assertions.assertThat(actual).isEqualTo(expected) + if (ignoreOrder) { + assertEqualIgnoreOrder(expected, actual) + } else { + Assertions.assertThat(actual).isEqualTo(expected) + } + } + } + + private fun assertEqualIgnoreOrder(expected: Any?, actual: Any?) { + when (expected) { + is Map<*, *> -> Assertions.assertThat(actual).asInstanceOf(InstanceOfAssertFactories.MAP) + .hasSize(expected.size) + .containsOnlyKeys(*expected.keys.toTypedArray()) + .satisfies { it.forEach { (key, value) -> assertEqualIgnoreOrder(expected[key], value) } } + is Collection<*> -> { + val assertions: List> = expected.map{ e -> Consumer { a -> assertEqualIgnoreOrder(e, a) } } + Assertions.assertThat(actual).asInstanceOf(InstanceOfAssertFactories.LIST) + .hasSize(expected.size) + .satisfiesExactlyInAnyOrder(*assertions.toTypedArray()) + } + else -> Assertions.assertThat(actual).isEqualTo(expected) } } @@ -230,6 +260,7 @@ class CypherTestSuite(fileName: String, val neo4j: Neo4j? = null) : AsciiDocTest private const val GRAPHQL_MARKER = "[source,graphql]" private const val GRAPHQL_VARIABLES_MARKER = "[source,json,request=true]" private const val GRAPHQL_RESPONSE_MARKER = "[source,json,response=true]" + private const val GRAPHQL_RESPONSE_IGNORE_ORDER_MARKER = "[source,json,response=true,ignore-order]" private const val QUERY_CONFIG_MARKER = "[source,json,query-config=true]" private const val CYPHER_PARAMS_MARKER = "[source,json]" } diff --git a/core/src/test/resources/filter-tests.adoc b/core/src/test/resources/filter-tests.adoc index 96e1dc3d..964d0bbc 100644 --- a/core/src/test/resources/filter-tests.adoc +++ b/core/src/test/resources/filter-tests.adoc @@ -72,7 +72,7 @@ SET p = props ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -108,7 +108,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -146,7 +146,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -184,7 +184,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -210,7 +210,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -242,7 +242,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -283,7 +283,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -319,7 +319,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -355,7 +355,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -393,7 +393,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -429,7 +429,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -467,7 +467,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -503,7 +503,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -539,7 +539,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -577,7 +577,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -613,7 +613,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -651,7 +651,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -801,7 +801,7 @@ RETURN company { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -837,7 +837,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -873,7 +873,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -911,7 +911,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -949,7 +949,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -987,7 +987,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1023,7 +1023,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1059,7 +1059,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -1091,7 +1091,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1131,7 +1131,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1167,7 +1167,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1205,7 +1205,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1241,7 +1241,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1279,7 +1279,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1317,7 +1317,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1355,7 +1355,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1391,7 +1391,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1427,7 +1427,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -1459,7 +1459,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1499,7 +1499,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1535,7 +1535,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1571,7 +1571,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1609,7 +1609,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1645,7 +1645,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1682,7 +1682,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1718,7 +1718,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1754,7 +1754,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1792,7 +1792,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1828,7 +1828,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1866,7 +1866,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1904,7 +1904,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -1936,7 +1936,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -1976,7 +1976,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2014,7 +2014,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2050,7 +2050,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -2082,7 +2082,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2122,7 +2122,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2160,7 +2160,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2198,7 +2198,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2230,7 +2230,7 @@ RETURN person { .name } AS person ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2268,7 +2268,7 @@ RETURN person { .name } AS person ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -2313,7 +2313,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2360,7 +2360,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2407,7 +2407,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2454,7 +2454,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2499,7 +2499,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -2527,7 +2527,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2563,7 +2563,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2601,7 +2601,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2641,7 +2641,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2679,7 +2679,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2719,7 +2719,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2759,7 +2759,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -2801,7 +2801,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -2838,7 +2838,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -2875,7 +2875,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -2912,7 +2912,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -2949,7 +2949,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -2986,7 +2986,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -3023,7 +3023,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ ] @@ -3057,7 +3057,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -3097,7 +3097,7 @@ RETURN p { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -3136,7 +3136,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -3173,7 +3173,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -3206,11 +3206,11 @@ RETURN p { .GraphQL-Query [source,graphql] ---- -{ p: company { employees(filter: { OR: [{ name: "Jane" },{name:"Joe"}]}, orderBy: name_desc) { name }}} +{ p: company { employees(filter: { OR: [{ name: "Jane" },{name:"Joe"}]}) { name }}} ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { @@ -3239,10 +3239,10 @@ RETURN p { ---- MATCH (p:Company) RETURN p { - employees: apoc.coll.sortMulti([(p)<-[:WORKS_AT]-(pEmployees:Person) WHERE (pEmployees.name = $filterPEmployeesOr1Name - OR pEmployees.name = $filterPEmployeesOr2Name) | pEmployees { + employees: [(p)<-[:WORKS_AT]-(pEmployees:Person) WHERE (pEmployees.name = $filterPEmployeesOr1Name + OR pEmployees.name = $filterPEmployeesOr2Name) | pEmployees { .name - }], ['name']) + }] } AS p ---- @@ -3257,7 +3257,7 @@ query filterQuery($filter: _PersonFilter) { person(filter: $filter) { name }} ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -3309,7 +3309,7 @@ query filterQuery($name: String) { person(filter: {name : $name}) { name }} ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -3351,7 +3351,7 @@ query filterQuery($name: String) { person(filter: {name : $name}) { name }} ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ ] @@ -3389,7 +3389,7 @@ query filterQuery($name: String) { person(filter: {name_not : $name}) { name }} ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "person" : [ { @@ -3435,7 +3435,7 @@ RETURN person { ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "p" : [ { diff --git a/core/src/test/resources/issues/gh-112.adoc b/core/src/test/resources/issues/gh-112.adoc index 0953179d..73dc452a 100644 --- a/core/src/test/resources/issues/gh-112.adoc +++ b/core/src/test/resources/issues/gh-112.adoc @@ -49,7 +49,7 @@ query user( $uuid: ID ){ ---- .GraphQL-Response -[source,json,response=true] +[source,json,response=true,ignore-order] ---- { "user" : [ { @@ -77,15 +77,15 @@ query user( $uuid: ID ){ .Cypher [source,cypher] ---- -MATCH (user: User) +MATCH (user:User) WHERE user.uuid = $uuid RETURN user { - .uuid, - .name, - associates: [(user)-[: ASSOCIATES_WITH]-(userAssociates: User) | userAssociates { - .name, - .uuid - }] + .uuid, + .name, + associates: [(user)-[:ASSOCIATES_WITH]-(userAssociates:User) | userAssociates { + .name, + .uuid + }] } AS user ---- diff --git a/pom.xml b/pom.xml index 2f13afc9..9d56728f 100755 --- a/pom.xml +++ b/pom.xml @@ -156,7 +156,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M3 + 3.0.0-M5