hasura / hasura/graphql-data-specification

Allow usage of functions in predicate expressions

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
19
Forks
3
PR merge metrics
No merged PRs in 30d

Description

We should extend the predicate function grammar to allow application of functions and not just : : style expressions.

This will allow the predicate expressions to capture more complex use-cases.
```javascript
// Custom type validation (check if email is valid)
isValid(node.email): true
```

Possible syntax that works well when represented in a JSON DSL:

```
apply:
functionName: isValid
arguments: [node.email]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.