@@ -79,7 +79,10 @@ func evalProjection(ctx context.Context, p Projection, payload map[string]interf
79
79
}
80
80
} else if ref , ok := def .Validator .(* schema.Reference ); ok {
81
81
// Execute sub-request in batch
82
- q := & Query {Predicate : Predicate {& Equal {Field : "id" , Value : val }}}
82
+ q := & Query {
83
+ Projection : pf .Children ,
84
+ Predicate : Predicate {& Equal {Field : "id" , Value : val }},
85
+ }
83
86
rbr .request (ref .Path , q , func (payloads []map [string ]interface {}, validator schema.Validator ) error {
84
87
var v interface {}
85
88
if len (payloads ) == 1 {
@@ -140,7 +143,8 @@ func evalProjection(ctx context.Context, p Projection, payload map[string]interf
140
143
// connectionQuery builds a query from a projection field on a schema.Connection type field.
141
144
func connectionQuery (pf ProjectionField , field string , id interface {}, validator schema.Validator ) (* Query , error ) {
142
145
q := & Query {
143
- Predicate : Predicate {& Equal {Field : field , Value : id }},
146
+ Projection : pf .Children ,
147
+ Predicate : Predicate {& Equal {Field : field , Value : id }},
144
148
}
145
149
if filter , ok := pf .Params ["filter" ].(string ); ok {
146
150
p , err := ParsePredicate (filter )
0 commit comments