@@ -69,7 +69,7 @@ async fn one_interface_one_entity() {
6969 type Animal implements Legged @entity { id: ID!, legs: Int }" ;
7070 let schema = InputSchema :: raw ( document, subgraph_id) ;
7171
72- let entity = ( "Animal" , entity ! { schema => id: "1" , legs: 3 , vid : 0i64 } ) ;
72+ let entity = ( "Animal" , entity ! { schema => id: "1" , legs: 3 } ) ;
7373
7474 // Collection query.
7575 let query = "query { leggeds(first: 100) { legs } }" ;
@@ -97,7 +97,7 @@ async fn one_interface_one_entity_typename() {
9797 type Animal implements Legged @entity { id: ID!, legs: Int }" ;
9898 let schema = InputSchema :: raw ( document, subgraph_id) ;
9999
100- let entity = ( "Animal" , entity ! { schema => id: "1" , legs: 3 , vid : 0i64 } ) ;
100+ let entity = ( "Animal" , entity ! { schema => id: "1" , legs: 3 } ) ;
101101
102102 let query = "query { leggeds(first: 100) { __typename } }" ;
103103
@@ -118,11 +118,8 @@ async fn one_interface_multiple_entities() {
118118 " ;
119119 let schema = InputSchema :: raw ( document, subgraph_id) ;
120120
121- let animal = ( "Animal" , entity ! { schema => id: "1" , legs: 3 , vid: 0i64 } ) ;
122- let furniture = (
123- "Furniture" ,
124- entity ! { schema => id: "2" , legs: 4 , vid: 0i64 } ,
125- ) ;
121+ let animal = ( "Animal" , entity ! { schema => id: "1" , legs: 3 } ) ;
122+ let furniture = ( "Furniture" , entity ! { schema => id: "2" , legs: 4 } ) ;
126123
127124 let query = "query { leggeds(first: 100, orderBy: legs) { legs } }" ;
128125
@@ -153,8 +150,8 @@ async fn reference_interface() {
153150
154151 let query = "query { leggeds(first: 100) { leg { id } } }" ;
155152
156- let leg = ( "Leg" , entity ! { schema => id: "1" , vid : 0i64 } ) ;
157- let animal = ( "Animal" , entity ! { schema => id: "1" , leg: 1 , vid : 0i64 } ) ;
153+ let leg = ( "Leg" , entity ! { schema => id: "1" } ) ;
154+ let animal = ( "Animal" , entity ! { schema => id: "1" , leg: 1 } ) ;
158155
159156 let res = insert_and_query ( subgraph_id, document, vec ! [ leg, animal] , query)
160157 . await
@@ -209,11 +206,11 @@ async fn reference_interface_derived() {
209206 let sell2 = ( "SellEvent" , entity ! { schema => id: "sell2" , vid: 1i64 } ) ;
210207 let gift = (
211208 "GiftEvent" ,
212- entity ! { schema => id: "gift" , transaction: "txn" , vid : 0i64 } ,
209+ entity ! { schema => id: "gift" , transaction: "txn" } ,
213210 ) ;
214211 let txn = (
215212 "Transaction" ,
216- entity ! { schema => id: "txn" , buyEvent: "buy" , sellEvents: vec![ "sell1" , "sell2" ] , vid : 0i64 } ,
213+ entity ! { schema => id: "txn" , buyEvent: "buy" , sellEvents: vec![ "sell1" , "sell2" ] } ,
217214 ) ;
218215
219216 let entities = vec ! [ buy, sell1, sell2, gift, txn] ;
@@ -308,11 +305,8 @@ async fn conflicting_implementors_id() {
308305 " ;
309306 let schema = InputSchema :: raw ( document, subgraph_id) ;
310307
311- let animal = ( "Animal" , entity ! { schema => id: "1" , legs: 3 , vid: 0i64 } ) ;
312- let furniture = (
313- "Furniture" ,
314- entity ! { schema => id: "1" , legs: 3 , vid: 0i64 } ,
315- ) ;
308+ let animal = ( "Animal" , entity ! { schema => id: "1" , legs: 3 } ) ;
309+ let furniture = ( "Furniture" , entity ! { schema => id: "1" , legs: 3 } ) ;
316310
317311 let query = "query { leggeds(first: 100) { legs } }" ;
318312
@@ -340,11 +334,8 @@ async fn derived_interface_relationship() {
340334 " ;
341335 let schema = InputSchema :: raw ( document, subgraph_id) ;
342336
343- let forest = ( "Forest" , entity ! { schema => id: "1" , vid: 0i64 } ) ;
344- let animal = (
345- "Animal" ,
346- entity ! { schema => id: "1" , forest: "1" , vid: 0i64 } ,
347- ) ;
337+ let forest = ( "Forest" , entity ! { schema => id: "1" } ) ;
338+ let animal = ( "Animal" , entity ! { schema => id: "1" , forest: "1" } ) ;
348339
349340 let query = "query { forests(first: 100) { dwellers(first: 100) { id } } }" ;
350341
@@ -371,12 +362,9 @@ async fn two_interfaces() {
371362 " ;
372363 let schema = InputSchema :: raw ( document, subgraph_id) ;
373364
374- let a = ( "A" , entity ! { schema => id: "1" , foo: "bla" , vid: 0i64 } ) ;
375- let b = ( "B" , entity ! { schema => id: "1" , bar: 100 , vid: 0i64 } ) ;
376- let ab = (
377- "AB" ,
378- entity ! { schema => id: "2" , foo: "ble" , bar: 200 , vid: 0i64 } ,
379- ) ;
365+ let a = ( "A" , entity ! { schema => id: "1" , foo: "bla" } ) ;
366+ let b = ( "B" , entity ! { schema => id: "1" , bar: 100 } ) ;
367+ let ab = ( "AB" , entity ! { schema => id: "2" , foo: "ble" , bar: 200 } ) ;
380368
381369 let query = "query {
382370 ibars(first: 100, orderBy: bar) { bar }
@@ -402,7 +390,7 @@ async fn interface_non_inline_fragment() {
402390
403391 let entity = (
404392 "Animal" ,
405- entity ! { schema => id: "1" , name: "cow" , legs: 3 , vid : 0i64 } ,
393+ entity ! { schema => id: "1" , name: "cow" , legs: 3 } ,
406394 ) ;
407395
408396 // Query only the fragment.
@@ -434,12 +422,9 @@ async fn interface_inline_fragment() {
434422
435423 let animal = (
436424 "Animal" ,
437- entity ! { schema => id: "1" , name: "cow" , legs: 4 , vid: 0i64 } ,
438- ) ;
439- let bird = (
440- "Bird" ,
441- entity ! { schema => id: "2" , airspeed: 24 , legs: 2 , vid: 0i64 } ,
425+ entity ! { schema => id: "1" , name: "cow" , legs: 4 } ,
442426 ) ;
427+ let bird = ( "Bird" , entity ! { schema => id: "2" , airspeed: 24 , legs: 2 } ) ;
443428
444429 let query =
445430 "query { leggeds(orderBy: legs) { ... on Animal { name } ...on Bird { airspeed } } }" ;
@@ -867,14 +852,8 @@ async fn merge_fields_not_in_interface() {
867852 }
868853 }" ;
869854
870- let animal = (
871- "Animal" ,
872- entity ! { schema => id: "cow" , human: "fred" , vid: 0i64 } ,
873- ) ;
874- let human = (
875- "Human" ,
876- entity ! { schema => id: "fred" , animal: "cow" , vid: 0i64 } ,
877- ) ;
855+ let animal = ( "Animal" , entity ! { schema => id: "cow" , human: "fred" } ) ;
856+ let human = ( "Human" , entity ! { schema => id: "fred" , animal: "cow" } ) ;
878857
879858 let res = insert_and_query ( subgraph_id, document, vec ! [ animal, human] , query)
880859 . await
@@ -947,15 +926,15 @@ async fn nested_interface_fragments() {
947926 }
948927 }" ;
949928
950- let foo = ( "Foo" , entity ! { schema => id: "foo" , vid : 0i64 } ) ;
951- let one = ( "One" , entity ! { schema => id: "1" , foo1: "foo" , vid : 0i64 } ) ;
929+ let foo = ( "Foo" , entity ! { schema => id: "foo" } ) ;
930+ let one = ( "One" , entity ! { schema => id: "1" , foo1: "foo" } ) ;
952931 let two = (
953932 "Two" ,
954- entity ! { schema => id: "2" , foo1: "foo" , foo2: "foo" , vid : 0i64 } ,
933+ entity ! { schema => id: "2" , foo1: "foo" , foo2: "foo" } ,
955934 ) ;
956935 let three = (
957936 "Three" ,
958- entity ! { schema => id: "3" , foo1: "foo" , foo2: "foo" , foo3: "foo" , vid : 0i64 } ,
937+ entity ! { schema => id: "3" , foo1: "foo" , foo2: "foo" , foo3: "foo" } ,
959938 ) ;
960939
961940 let res = insert_and_query ( subgraph_id, document, vec ! [ foo, one, two, three] , query)
@@ -1028,9 +1007,9 @@ async fn nested_interface_fragments_overlapping() {
10281007 }
10291008 }" ;
10301009
1031- let foo = ( "Foo" , entity ! { schema => id: "foo" , vid : 0i64 } ) ;
1032- let one = ( "One" , entity ! { schema => id: "1" , foo1: "foo" , vid : 0i64 } ) ;
1033- let two = ( "Two" , entity ! { schema => id: "2" , foo1: "foo" , vid : 0i64 } ) ;
1010+ let foo = ( "Foo" , entity ! { schema => id: "foo" } ) ;
1011+ let one = ( "One" , entity ! { schema => id: "1" , foo1: "foo" } ) ;
1012+ let two = ( "Two" , entity ! { schema => id: "2" , foo1: "foo" } ) ;
10341013 let res = insert_and_query ( subgraph_id, document, vec ! [ foo, one, two] , query)
10351014 . await
10361015 . unwrap ( ) ;
@@ -1305,13 +1284,10 @@ async fn mixed_mutability() {
13051284 let query = "query { events { id } }" ;
13061285
13071286 let entities = vec ! [
1308- (
1309- "Mutable" ,
1310- entity! { schema => id: "mut0" , name: "mut0" , vid: 0i64 } ,
1311- ) ,
1287+ ( "Mutable" , entity! { schema => id: "mut0" , name: "mut0" } ) ,
13121288 (
13131289 "Immutable" ,
1314- entity! { schema => id: "immo0" , name: "immo0" , vid : 0i64 } ,
1290+ entity! { schema => id: "immo0" , name: "immo0" } ,
13151291 ) ,
13161292 ] ;
13171293
@@ -1362,15 +1338,9 @@ async fn derived_interface_bytes() {
13621338 let query = "query { pools { trades { id } } }" ;
13631339
13641340 let entities = vec ! [
1365- ( "Pool" , entity! { schema => id: b( "0xf001" ) , vid: 0i64 } ) ,
1366- (
1367- "Sell" ,
1368- entity! { schema => id: b( "0xc0" ) , pool: "0xf001" , vid: 0i64 } ,
1369- ) ,
1370- (
1371- "Buy" ,
1372- entity! { schema => id: b( "0xb0" ) , pool: "0xf001" , vid: 0i64 } ,
1373- ) ,
1341+ ( "Pool" , entity! { schema => id: b( "0xf001" ) } ) ,
1342+ ( "Sell" , entity! { schema => id: b( "0xc0" ) , pool: "0xf001" } ) ,
1343+ ( "Buy" , entity! { schema => id: b( "0xb0" ) , pool: "0xf001" } ) ,
13741344 ] ;
13751345
13761346 let res = insert_and_query ( subgraph_id, document, entities, query)
0 commit comments