Pometry / Raphtory

Scalable graph analytics database powered by a multithreaded, vectorized temporal engine, written in Rust
https://raphtory.com
GNU General Public License v3.0
347 stars 54 forks source link

impl filters and tests #1857

Open shivam-880 opened 4 days ago

shivam-880 commented 4 days ago

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change? If yes is this documented?

How was this patch tested?

Issues

_If this resolves any issues, please link to them here, the format is a KEYWORD followed by @__ KEYWORDS available are close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved. Please delete this text before creating your PR

Are there any further changes required?

shivam-880 commented 4 days ago

Initial ideas on what shapes these apis will be taking going forward alongside developments in lib.

query w {
  graph(path: "mygraph1", nodeFilter: {}, edgeFilter: {}) {
    # nodeFilter() {}
    # edgeFitler() {}

    nodes(nodeFilter: {
      or: [
        {and: [{prop: {field: "a", ge: 1}}, {type: ["a","b","c"]}]},
        {prop: {field: "b", any: [1,2,3]}}
      ]
    }) {
      list {
        name
      }
    }
    }
}

query w2 {
  graph(path: "mygraph1") {
    # nodePropertyFilter() {}
    # edgePropertyFitler() {}

    n1: nodes(nodeFilter: {
      and: [{propFilter: {field: "a", ge: 1}}, {typeFilter: ["a","b","c"]}]
    }) {
      list {
        name
      }
    }

    n2: nodes(nodeFilter: {
      propFilter: {field: "a", ge: 1}
    }) {
      list {
        name
      }
    }
    }
}