Skip to content

feat: Pipe / chaining operator #67

Description

@daavidrgz

Summary

Add a pipe operator (|) that allows composing queries sequentially, where the output of one query becomes the input to the next.

Proposed Syntax

{ users } | { name, email }
{ orders(status = "pending") } | { items } | { price }

Motivation

Query composition via piping would unlock multi-step transformations and make complex workflows expressible without deep nesting. This is jq's killer feature and one of the main reasons people stick with it despite the steep learning curve. Adding this to gq's already-intuitive syntax would be a significant competitive advantage.

Considerations

  • How does the pipe interact with array context? (e.g., does { users } | { name } automatically map over array elements?)
  • Should there be a way to reference the piped input explicitly?
  • Interaction with the Jinja template feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions