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

@cypher directives in where clauses #1997

Closed
Tanner-Scadden opened this issue Aug 29, 2022 · 2 comments
Closed

@cypher directives in where clauses #1997

Tanner-Scadden opened this issue Aug 29, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists feature: @cypher feature: filtering feature request New feature or request

Comments

@Tanner-Scadden
Copy link

Tanner-Scadden commented Aug 29, 2022

Is your feature request related to a problem? Please describe.
Would be awesome to be able to filter results by values that have a @cypher directive! Would help with filtering by values such as ages calculated on date of birth values.

Describe the solution you'd like
To include the @cypher directive values in the autogenerated where clauses. I don't imagine this would be too hard since the library adds these values to the sort by options.

Describe alternatives you've considered
N/A

Additional context
Example:

type User {
  id: String! @id 
  birthday: Date!
  age: Int!  @cypher(
        statement: """
        MATCH (this)
        return duration.inMonths(date(this.birthday), date()).years
        """
      )
}

query Users {
  users(where: { age_GT: 60 }) {
    id
  }
}
@Tanner-Scadden Tanner-Scadden added the feature request New feature or request label Aug 29, 2022
@MacondoExpress MacondoExpress added feature: filtering feature: @cypher duplicate This issue or pull request already exists labels Sep 5, 2022
@MacondoExpress
Copy link
Contributor

Hi, @Tanner-Scadden thanks for the request!
We are doing some investigation around this particular request that you can find here #2029.
I've added the duplicate flag as this request seems to me very similar to the #554.

@Tanner-Scadden
Copy link
Author

@MacondoExpress thanks for the update! Yes, I didn't see that request before. We can close out that one and I'll follow the other thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists feature: @cypher feature: filtering feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants