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

[Feature Request] Support for COUNT in Cypher #118

Open
3 of 6 tasks
olafhartong opened this issue Sep 25, 2023 · 0 comments
Open
3 of 6 tasks

[Feature Request] Support for COUNT in Cypher #118

olafhartong opened this issue Sep 25, 2023 · 0 comments
Labels
enhancement New feature or request ticketed Ticket has been created internally for tracking

Comments

@olafhartong
Copy link

olafhartong commented Sep 25, 2023

Description:

When running a Cypher query over either the UI or API with a COUNT() in there, it will result in an error.
In the UI I can expect output/rendering limitations, but over the API this should be possible.

Component(s) Affected:

  • UI
  • API
  • Neo4j
  • PostgreSQL
  • Data Collector (SharpHound, AzureHound)
  • Other (tooling, documentation, etc.)

Steps to Reproduce:

  1. Go to [the API explorer]
  2. Navigate to graphs/cypher and click try out
  3. Enter the following json blob as body
{
  "include_properties": true,
  "query": "MATCH (x:Group{highvalue:true}) RETURN COUNT(x)"
}
  1. This results in this error
{
  "http_status": 500,
  "timestamp": "2023-09-25T18:31:11.914962335Z",
  "request_id": "b97e1e4b-950d-4528-a65d-fe35a62b183e",
  "errors": [
    {
      "context": "",
      "message": "no matching target given for type: int64"
    }
  ]
}

Even trying to fool it with a string is resulting in a similar error

{
  "include_properties": true,
  "query": "MATCH (x:Group) RETURN toString(COUNT(x))"
}
{
  "http_status": 500,
  "timestamp": "2023-09-25T18:39:50.388734672Z",
  "request_id": "b412b4a1-456e-4c20-af01-d82e95a7c71a",
  "errors": [
    {
      "context": "",
      "message": "no matching target given for type: string"
    }
  ]
}

Expected Behavior:

I would like to be able to count data and get results ;)

Actual Behavior:

I get errors.

BloodHound: CE- latest (today=09/25) (af5b2e6cb00a)

@olafhartong olafhartong added bug Something isn't working triage This issue requires triaging labels Sep 25, 2023
@StephenHinck StephenHinck changed the title Cypher counts are returning sever 500 errors [Feature Request] Support for COUNT in Cypher Oct 26, 2023
@StephenHinck StephenHinck added enhancement New feature or request and removed bug Something isn't working triage This issue requires triaging labels Oct 26, 2023
@slokie-so slokie-so added the ticketed Ticket has been created internally for tracking label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ticketed Ticket has been created internally for tracking
Projects
None yet
Development

No branches or pull requests

3 participants