maoosi / prisma-appsync

⚡ Turns your ◭ Prisma Schema into a fully-featured GraphQL API, tailored for AWS AppSync.

Home Page:https://prisma-appsync.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Prisma schema column default values should be reflected in input types

Tenrys opened this issue · comments

commented

It's a small detail, but being able to see that certain fields can have default values from within a GraphQL IDE (like Apollo Explorer) would be a nice improvement, as per https://stackoverflow.com/a/51567429.

Great suggestion! @all-contributors please add @Tenrys for ideas!

@maoosi

I've put up a pull request to add @Tenrys! 🎉

Released in v1.0.0.

commented

It seems like having an empty string as your default value breaks the schema, since default string values don't have quotes around them. In my fork I made it so default string values are surrounded by blockquotes (""") with the default value escaping the blockquote sequence of characters. (\""")

Thanks for reporting @Tenrys - I've just released a fix with v1.0.1!