Skip to content

impl gql path filter, add tests - #2117

Merged
miratepuffin merged 6 commits into
masterfrom
features/gql_path_filter
Jun 13, 2025
Merged

miratepuffin merged 6 commits into
masterfrom
features/gql_path_filter

Conversation

@shivamka1

Copy link
Copy Markdown
Contributor

Filter neighbours:

filter_expr1 = filter.Node.name() == "d"
filter_expr2 = filter.Property("prop1") > 10
result_names = sorted(graph.node("a").filter_nodes(filter_expr1 & filter_expr2).out_neighbours.name)
expected_names = ['d']
assert result_names == expected_names
query {
  graph(path: "g") {
    node(name: "a") {
      nodeFilter(filter: {
        and: [
          {
            node: {
              field: NODE_NAME,
              operator: EQUAL,
              value:{ str: "d" }
            }
          },
          {
            property: {
              name: "prop1"
              operator: GREATER_THAN
              value: { i64: 10 }
            }
          }
        ]
      }) {
        outNeighbours {
          list {
            name
          }
        }
      }
    }
  }
}

Comment thread python/tests/test_base_install/test_graphql/test_namespace.py Outdated
@miratepuffin
miratepuffin merged commit 9e82061 into master Jun 13, 2025
@miratepuffin
miratepuffin deleted the features/gql_path_filter branch June 13, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants