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 {
33
33
NonFatalErrors ,
34
34
Grafting ,
35
35
FullTextSearch ,
36
+ Aggregations ,
37
+ BytesAsIds ,
38
+ DeclaredEthCalls ,
39
+ ImmutableEntities ,
36
40
#[ serde( alias = "nonDeterministicIpfs" ) ]
37
41
IpfsOnEthereumContracts ,
38
42
}
@@ -154,11 +158,15 @@ mod tests {
154
158
FullTextSearch ,
155
159
IpfsOnEthereumContracts ,
156
160
] ;
157
- const STRING : [ & str ; 4 ] = [
161
+ const STRING : [ & str ; 8 ] = [
158
162
"nonFatalErrors" ,
159
163
"grafting" ,
160
164
"fullTextSearch" ,
161
165
"ipfsOnEthereumContracts" ,
166
+ "declaredEthCalls" ,
167
+ "aggregations" ,
168
+ "immutableEntities" ,
169
+ "bytesAsIds" ,
162
170
] ;
163
171
164
172
#[ test]
Original file line number Diff line number Diff line change @@ -627,7 +627,24 @@ impl<S: Store> IndexNodeResolver<S> {
627
627
628
628
let subgraph_store = self . store . subgraph_store ( ) ;
629
629
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
+ }
631
648
None => self . get_features_from_ipfs ( & deployment_hash) . await ?,
632
649
} ;
633
650
Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ enum Feature {
161
161
grafting
162
162
fullTextSearch
163
163
ipfsOnEthereumContracts
164
+ aggregations
165
+ declaredEthCalls
166
+ immutableEntities
167
+ bytesAsIds
164
168
}
165
169
166
170
input BlockInput {
Original file line number Diff line number Diff line change @@ -549,7 +549,7 @@ fn subgraph_features() {
549
549
assert_eq ! (
550
550
vec![
551
551
SubgraphFeature :: NonFatalErrors . to_string( ) ,
552
- SubgraphFeature :: FullTextSearch . to_string( )
552
+ SubgraphFeature :: FullTextSearch . to_string( ) ,
553
553
] ,
554
554
features
555
555
) ;
You can’t perform that action at this time.
0 commit comments