You need to implement relationship builders for your specific [aspect]s and [relationship]s if they are not already defined.
Relationship builders build list of relationships after processing aspects and any relationship builder should implement `BaseRelationshipBuilder` abstract class.
Relationship builders are per aspect and per relationship type.
```java
public abstract class BaseRelationshipBuilder<ASPECTextendsRecordTemplate> {
private Class<ASPECT> _aspectClass;
public BaseRelationshipBuilder(Class<ASPECT> aspectClass) {
_aspectClass = aspectClass;
}
/**
* Returns the aspect class this {@link BaseRelationshipBuilder} supports
*/
public Class<ASPECT> supportedAspectClass() {
return _aspectClass;
}
/**
* Returns a list of corresponding relationship updates for the given metadata aspect
*/
public abstract <URNextendsUrn> List<GraphBuilder.RelationshipUpdates> buildRelationships(URN urn, ASPECT aspect);
}
```
## 3. Implement graph builders
Graph builders build graph updates by processing [snapshot]s.
They internally use relationship builders to generate edges and nodes of the graph.
All relationship builders for an [entity] should be registered through graph builder.
```java
public abstract class BaseGraphBuilder<SNAPSHOTextendsRecordTemplate> implements GraphBuilder<SNAPSHOT> {
private final Class<SNAPSHOT> _snapshotClass;
private final Map<Class<?extendsRecordTemplate>, BaseRelationshipBuilder> _relationshipBuildersMap;
public BaseGraphBuilder(@Nonnull Class<SNAPSHOT> snapshotClass,