Skip to Content

SGraph Query Language Now Integrated into Softagram Analyzer Web Frontend

Filter and explore code dependencies directly in the browser with a powerful query language

Table of contents

No titles in the blog post

We are excited to announce that the SGraph Query Language is now fully integrated into the Softagram Analyzer web frontend. This means you can now filter, search, and explore code dependency graphs directly in your browser — no CLI tools or separate workflows needed.

What is SGraph Query Language?

SGraph Query Language is a purpose-built language for querying software dependency graphs. It lets you write expressive filters like:

  • @type=file AND @loc>500 — find source files with over 500 lines of code
  • "*" -import-> "*" — find all import-type dependencies across the entire codebase
  • (@type=file OR @type=class) AND @loc>100 — combine type filters with numeric thresholds to find significant code elements

The language supports logical operators (AND, OR, NOT), attribute filters (@type, @loc), dependency arrows (-->, --, --->), typed dependency filters (-import->), path lookups, regex matching, and more — all designed for the way developers think about code structure.

Pull Request Visualization of the Integration

This Softagram visualization shows the actual pull request that brought sgraph-query into the web frontend — new components, parsers, and hooks highlighted in green.

SGraph Query Language integration - Pull Request visualization by Softagram Analyzer

What This Means in Practice

With this integration, the Softagram Analyzer web UI now includes a QueryPanel component where you can type sgraph queries and instantly see the filtered dependency graph. The implementation includes:

  • Full parser and evaluator — the query language is parsed and evaluated entirely in the browser (TypeScript)
  • GraphView integration — filtered results are rendered directly in the interactive dependency graph
  • useQueryFilter hook — a React hook that connects the query panel to the graph visualization
  • Comprehensive test suite — parser, evaluator, and helper tests ensure reliability

Try It Yourself

Softagram Analyzer is available at two addresses:

Log in, open any analyzed pull request or repository model, and you will find the new query panel ready to use. Start typing a query and watch the dependency graph filter in real time.

What's Next

This is the first step in making SGraph Query Language a central part of the Softagram experience. Upcoming features include:

  • Saved queries and query templates for common architectural checks
  • Query-based alerts in CI/CD pipelines
  • Integration with code review workflows — automatically highlight risky changes

We believe that understanding code structure should be as natural as searching text. SGraph Query Language brings that vision one step closer.

Archive