You can specify criteria for the graph expansion for any of the graph nodes. For example:
' Set criteria on graph nodes
lobjGraphExpansionQuery.AddGraphDefCriteria("+IClassDef", ObjectCriteria.Name.StartsWith("SPFCDWC") Or ObjectCriteria.Name.StartsWith("SPFTEF"))
lobjGraphExpansionQuery.AddGraphDefCriteria("ExposedPropertyDefs", ObjectCriteria.UID.Contains("CDW"))
For more information on how to build object criteria, see the Using the Dynamic Query in the Data Access Layer (DAL).