Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL - can't use parameters #918

Open
booth23 opened this issue Feb 4, 2020 · 0 comments
Open

GraphQL - can't use parameters #918

booth23 opened this issue Feb 4, 2020 · 0 comments

Comments

@booth23
Copy link

booth23 commented Feb 4, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant