cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Nested Filtering Within GraphQL/GRANDstack Giving Incorrect Values

Hello all
I am trying to implement a filter using graphQL/GRANDstack with the following types in my schema:

`type OSVersion {
Value: String
}

type HostName {
Value: String
OSVersions: [OSVersion] @relation(name: "OSVersion", direction: "OUT")
}`

To get only hostnames that are connected to an OSVersion containing the Value "windows 2012" I believe I could do something along the lines of this:

{ HostName (filter:{OSVersions_some:{Value:"windows 2012"}}){ Value OSVersions { Value } } }

The result of this graphQL query gives values that don't satisfy the filter e.g the first two Hostnames returned:
"data": { "HostName": [ { "Value": "uk19", "OSVersions": [ { "Value": "unknown unknown" } ] }, { "Value": "glkedxa01v", "OSVersions": [ { "Value": "windows 2008r2" } ] }

If i run the follwing cypher query:
match (hostname:HostName)-[:OSVersion]->(os:OSVersion) where os.Value = "windows 2012" return hostname

I get the expected 540 hostnames, which doesn't match up with the filter I am using in GraphQL
I am unsure where I am going wrong here and any help would be much appreciated

0 REPLIES 0