cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.83k stars 1.25k forks source link

GraphQL - can't use parameters #918

Open booth23 opened 4 years ago

booth23 commented 4 years ago

I'm use the Cayley snap package and I can run queries using Gizmo or MQL, but GraphQL.

The following Gizmo query works fine: g.V("000042").Save("account", "account").Save("ba","ba").All()

Result: { "result": [ { "account": "ABCDE", "ba": "2", "id": "000042" } ] } With GraphQL, I can search by ID and return the ID. It also works with all fields (*). { nodes(id:"000042") { id } } Returns { "data": { "nodes": { "id": "000042" } } }

Similarly, I can return all properties: { nodes(id:"000042") { * } }

Returns: { "data": { "nodes": { "account": "ABCDE", "ba": "2", "id": "000042", "line": "000042", "type": "\"line\"" } } }

However, if I try to just return the account or ba field, it returns nothing. { nodes(id : "000042" ) { account } }

Any suggestions?

Thanks.

Brandon