Skip to content

docs(gfql): cheatsheet recommends callable predicates that validation rejects #2169

Description

@lmeyerov

At master 599c405a234bff2402e4f76041cac6e169f6f7c8, the GFQL cheatsheet documents callable values in filter_dict and recommends n({"age": lambda x: x > 30}). That example fails on both pandas and native Polars with GFQLTypeError (type-mismatch), which correctly recommends gt(5) or simple values.

Reproduce with a graph bound to a nodes dataframe containing id and age, then run g.gfql([n({"age": lambda x: x > 30})], engine="pandas") or the equivalent native Polars graph. Source: docs/source/gfql/quick.rst, Node Matchers/Edge Matchers; the documented condition_function shapes also need correction.

This docs correction is independent of #967, which requests restoring local lambda support. Keep that feature request open.

Acceptance:

  • Replace unsupported callable examples/prose with supported declarative predicates such as gt(30).
  • Run the corrected node/edge examples against pandas and eager Polars with expected rows; preserve structured rejection of unsupported callables.
  • Keep local query examples independent of visualization-server credentials; no runtime or remote serialization changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions