hasura / graphql-data-specification

A specification for Data APIs with GraphQL
https://hasura.github.io/graphql-data-specification/
18 stars 3 forks source link

Clarify Predicate functions expressiveness and flexibility #15

Open jnak opened 1 year ago

jnak commented 1 year ago

Hi,

I'm trying to understand the spec in its current form. Could you clarify how expressive predicate functions you intend predicate functions to be? Specifically, can they be defined as arbitrary functions using some simple scripting language? Or is it limited to a few keywords? In either case, can you elaborate on the goals and constrains that informed your current thinking?

Best, J

coco98 commented 1 year ago

@jnak Great question.

We'll add that to the spec to define what operators are allowed in the predicate function and where they come from. There are 2 sources:

  1. A standard set of operators
  2. A set of operators provided by the underlying data-source that can be applied to any node within that data source (eg: a time-series operator in a time series database)