graphile-engine icon indicating copy to clipboard operation
graphile-engine copied to clipboard

[graphile-utils] `OrderSpec` type in `makeAddPgTableOrderByPlugin` is too restrictive

Open keithlayne opened this issue 5 years ago • 0 comments

OrderSpec is defined here.

The example from the docs doesn't match this type - it uses a function type in the first element of that tuple:

(context: GenContext) => SQLQuery

(Not sure that GenContext is actually right there)

TS error:

error TS2345: Argument of type '({}: GenContext) => SQLQuery' is not assignable to parameter of type 'string | SQLRawNode | SQLValueNode | SQLIdentifierNode | SQLQuery'.
  Type '({}: GenContext) => SQLQuery' is missing the following properties from type 'SQLQuery': pop, push, concat, join, and 27 more.

keithlayne avatar Jan 15 '20 20:01 keithlayne