and if possible, where in the docs is this explain...
# prisma-whats-new
q
and if possible, where in the docs is this explained? if i missed it, then my apologies
s
Hi @quadsurf - all enums have their own dedicated type. You can find the name of the concrete enum type in the docs panel in the right side of the playground
q
thank you @sorenbs , but what i found odd is that i had to split up both my table name and my field name with 3 underscores in order to get it to work, and that part was not in the list of methods in the docs tab you mentioned table name: PaymentMethod enum’s field name: cardBrand so to get it to work, i had to add underscores between each word in the table name, between each word in the enum’s field name, and then another underscore in the middle, as seen below: $cardBrand: PAYMENT_METHOD_CARD_BRAND!, even though this was the only way i could get it to work (i got lucky after too much time spent experimenting haha), this seems incorrect … i think the more proper way for enums to declare their own type, is like this: $cardBrand: PAYMENTMETHOD_CARDBRAND!, not like this: $cardBrand: PAYMENT_METHOD_CARD_BRAND!, so if my table was named with some made up word, and graphql starts forcing me to split up that made-up word with an underscore arbitrarily, then that could cause some inconsistencies
n
Did you reverse engineer this naming scheme? You can actually go to the PaymentMethod type in the Playground docs where you can see how the enum is named
also, we will introduce enums on a project level soon, this will improve the naming issues you mentioned as well 🙂
q
the playground is actually where i am testing/constructing all of my queries/mutations… and it’s in the playground where i am running into this scenario… yes, the docs tab has been pretty helpful, but even still, i’m a bit confused as to why the enum field named cardBrand on the PaymentMethod table, requires the syntax below in order to work: $cardBrand: PAYMENT_METHOD_CARD_BRAND! (works great in the playground) $cardBrand: PAYMENTMETHOD_CARDBRAND! (does not work in the playground) just not sure why the naming convention is breaking up my table’s name and my field’s name, when for the same exact type of query on other tables, the naming convention is 1 underscore, not 3… is this a facebook GraphiQL bug? not a big deal in the grand scheme of things i guess, but will send screenshots
n
this is the naming scheme that we chose and a type has only one name. I can see how that scheme is not optimal for everyone. but again, once we introduce enums on a project level (instead of a model level), this will be not an issue anymore 🙂 thanks for your feedback though!