File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed
store/test-store/tests/postgres Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ pub enum SubgraphFeature {
3333 NonFatalErrors ,
3434 Grafting ,
3535 FullTextSearch ,
36+ Aggregations ,
37+ BytesAsIds ,
38+ DeclaredEthCalls ,
39+ ImmutableEntities ,
3640 #[ serde( alias = "nonDeterministicIpfs" ) ]
3741 IpfsOnEthereumContracts ,
3842}
@@ -154,11 +158,15 @@ mod tests {
154158 FullTextSearch ,
155159 IpfsOnEthereumContracts ,
156160 ] ;
157- const STRING : [ & str ; 4 ] = [
161+ const STRING : [ & str ; 8 ] = [
158162 "nonFatalErrors" ,
159163 "grafting" ,
160164 "fullTextSearch" ,
161165 "ipfsOnEthereumContracts" ,
166+ "declaredEthCalls" ,
167+ "aggregations" ,
168+ "immutableEntities" ,
169+ "bytesAsIds" ,
162170 ] ;
163171
164172 #[ test]
Original file line number Diff line number Diff line change @@ -627,7 +627,24 @@ impl<S: Store> IndexNodeResolver<S> {
627627
628628 let subgraph_store = self . store . subgraph_store ( ) ;
629629 let features = match subgraph_store. subgraph_features ( & deployment_hash) . await ? {
630- Some ( features) => features,
630+ Some ( features) => {
631+ let mut deployment_features = features. clone ( ) ;
632+ let features = & mut deployment_features. features ;
633+
634+ if deployment_features. has_declared_calls {
635+ features. push ( "declaredEthCalls" . to_string ( ) ) ;
636+ }
637+ if deployment_features. has_aggregations {
638+ features. push ( "aggregations" . to_string ( ) ) ;
639+ }
640+ if !deployment_features. immutable_entities . is_empty ( ) {
641+ features. push ( "immutableEntities" . to_string ( ) ) ;
642+ }
643+ if deployment_features. has_bytes_as_ids {
644+ features. push ( "bytesAsIds" . to_string ( ) ) ;
645+ }
646+ deployment_features
647+ }
631648 None => self . get_features_from_ipfs ( & deployment_hash) . await ?,
632649 } ;
633650
Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ enum Feature {
161161 grafting
162162 fullTextSearch
163163 ipfsOnEthereumContracts
164+ aggregations
165+ declaredEthCalls
166+ immutableEntities
167+ bytesAsIds
164168}
165169
166170input BlockInput {
Original file line number Diff line number Diff line change @@ -549,7 +549,7 @@ fn subgraph_features() {
549549 assert_eq ! (
550550 vec![
551551 SubgraphFeature :: NonFatalErrors . to_string( ) ,
552- SubgraphFeature :: FullTextSearch . to_string( )
552+ SubgraphFeature :: FullTextSearch . to_string( ) ,
553553 ] ,
554554 features
555555 ) ;
You can’t perform that action at this time.
0 commit comments