neo4j-graphql / neo4j-graphql-java

Neo4j Labs Project: Pure JVM translation for GraphQL queries and mutations to Neo4j's Cypher
Apache License 2.0
105 stars 49 forks source link

nested null handling / propagation #87

Open jexp opened 4 years ago

jexp commented 4 years ago

this fails

        // errors on non-null fields are propagated up to the first nullable field
        // and an error message is added
        assertResult("""{ p: person { name, company2(name: "ACME2") { name } } }""",
                mapOf("p" to listOf(null)))

    @Test
    fun dynamicMutationConflictsWithAutoGenerated() {
        val schema = """
type Person {
    name: String
    company: Company @relation(name:"WORKS_AT")
    company2: Company! @relation(name:"WORKS_AT")
    companies: [Company]! @relation(name:"WORKS_AT")
    companies2: [Company!]! @relation(name:"WORKS_AT")
}
type Company {
    name: String
}
"""
Andy2003 commented 3 years ago

The example above is taken from https://github.com/neo4j-graphql/neo4j-graphql/blame/3.5/src/test/java/org/neo4j/graphql/NestedNonNullTest.kt

It was introduced by https://github.com/neo4j-graphql/neo4j-graphql/issues/80

This feature requires post processing in combination with e.g. apoc.util.validate

As of now solving this issue has no priority.