Skip to content

Release Notes: v0.2.0

Release Date: 2026-04-13

Highlights

  • Framework-specific edge types: New edge type constants for framework detection in multi-language extractors

New Edge Type Constants

This release adds six new edge type constants to support framework-aware code analysis:

Constant Value Description
EdgeTypeInjects injects Dependency injection (Spring @Autowired)
EdgeTypeHandlesRoute handles_route Controller method HTTP routing
EdgeTypeHasMany has_many One-to-many relationships (JPA @OneToMany)
EdgeTypeBelongsTo belongs_to Many-to-one relationships (JPA @ManyToOne)
EdgeTypeAnnotatedWith annotated_with Annotation relationships
EdgeTypeMethodOf method_of Method belonging to class/struct

Usage Examples

Dependency Injection:

edge := &graph.Edge{
    From:       "class_UserService",
    To:         "class_UserRepository",
    Type:       graph.EdgeTypeInjects,
    Confidence: graph.ConfidenceExtracted,
    Attrs: map[string]string{
        "injection_type": "Autowired",
    },
}

HTTP Route Handling:

edge := &graph.Edge{
    From:       "method_UserController.getUser",
    To:         "route_/api/users/{id}",
    Type:       graph.EdgeTypeHandlesRoute,
    Confidence: graph.ConfidenceExtracted,
}

JPA Relationships:

// One-to-many: Author has many Books
edge := &graph.Edge{
    From:       "class_Author",
    To:         "class_Book",
    Type:       graph.EdgeTypeHasMany,
    Confidence: graph.ConfidenceExtracted,
    Attrs: map[string]string{
        "property": "books",
    },
}

// Many-to-one: Book belongs to Author
edge := &graph.Edge{
    From:       "class_Book",
    To:         "class_Author",
    Type:       graph.EdgeTypeBelongsTo,
    Confidence: graph.ConfidenceExtracted,
    Attrs: map[string]string{
        "property": "author",
    },
}

Annotations:

edge := &graph.Edge{
    From:       "class_UserController",
    To:         "annotation_RestController",
    Type:       graph.EdgeTypeAnnotatedWith,
    Confidence: graph.ConfidenceExtracted,
}

Installation

go get github.com/plexusone/graphfs@v0.2.0

Backward Compatibility

This release is fully backward compatible with v0.1.0. The new edge type constants are additive and do not affect existing graphs.