Sending ColumnType enum values in mutations in typescript

Oddly, the enums are text but CANNOT be in quotes in your query string.

If you are using GraphQL variables instead, just make sure you define the variable as ColumnType! and in the variables send the enum as a string. Yeah, counter-intuitive.

If you need a bit of assistance on the typescript enum, I took care of that in this thread: ERRATA: remote options columnType uses old string not modern enum still - #5 by codyfrisch

Also included a function that converts the old strings to the new enum strings.

2 Likes