Graphql-engine: '12h', '1M'... are not valid GraphQL enum value names

Created on 27 May 2020  路  1Comment  路  Source: hasura/graphql-engine

Hi, I tried to set a table as enum table, but I receive the following error:

Setting table as enum failed
the table "table.interval_enum" cannot be used as an enum because the values 12h, 1M, 1d, 1h, 1m, 1w, 2h, 30m, 3d, 3m, 4h, 5m, 6h, and "8h" are not valid GraphQL enum value names

and here is my table SQL description:

CREATE TABLE "table"."interval_enum" ("value" text PRIMARY KEY, "description" text);

I looked at http://spec.graphql.org/June2018/#EnumValue, but doesn't seem like "12h" as a text isn't a valid enum value....

Any idea?
Thanks for your help!

Most helpful comment

As per GraphQL spec ENUM types have to be Name but not true or false or null. And the Name type can't start with a number.
http://spec.graphql.org/June2018/#Name

>All comments

As per GraphQL spec ENUM types have to be Name but not true or false or null. And the Name type can't start with a number.
http://spec.graphql.org/June2018/#Name

Was this page helpful?
0 / 5 - 0 ratings