@@ -198,13 +198,15 @@ export type ProcessNode<
198
198
RelationName extends string ,
199
199
Relationships extends GenericRelationship [ ] ,
200
200
NodeType extends Ast . Node
201
- > = NodeType [ 'type' ] extends Ast . StarNode [ 'type' ] // If the selection is *
202
- ? Row
203
- : NodeType [ 'type' ] extends Ast . SpreadNode [ 'type' ] // If the selection is a ...spread
204
- ? ProcessSpreadNode < Schema , Row , RelationName , Relationships , Extract < NodeType , Ast . SpreadNode > >
205
- : NodeType [ 'type' ] extends Ast . FieldNode [ 'type' ]
206
- ? ProcessFieldNode < Schema , Row , RelationName , Relationships , Extract < NodeType , Ast . FieldNode > >
207
- : SelectQueryError < 'Unsupported node type.' >
201
+ > =
202
+ // TODO: figure out why comparing the `type` property is necessary vs. `NodeType extends Ast.StarNode`
203
+ NodeType [ 'type' ] extends Ast . StarNode [ 'type' ] // If the selection is *
204
+ ? Row
205
+ : NodeType [ 'type' ] extends Ast . SpreadNode [ 'type' ] // If the selection is a ...spread
206
+ ? ProcessSpreadNode < Schema , Row , RelationName , Relationships , Extract < NodeType , Ast . SpreadNode > >
207
+ : NodeType [ 'type' ] extends Ast . FieldNode [ 'type' ]
208
+ ? ProcessFieldNode < Schema , Row , RelationName , Relationships , Extract < NodeType , Ast . FieldNode > >
209
+ : SelectQueryError < 'Unsupported node type.' >
208
210
209
211
/**
210
212
* Processes a FieldNode and returns the resulting TypeScript type.
0 commit comments