Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nullable case #3

Merged
merged 5 commits into from
Jan 12, 2023
Merged

Add nullable case #3

merged 5 commits into from
Jan 12, 2023

Conversation

emroot
Copy link
Contributor

@emroot emroot commented Jan 12, 2023

Json can be nullable especially in the case of CreateInput. Add a couple more cases to handle that.

@arthurfiorette

@arthurfiorette
Copy link
Owner

arthurfiorette commented Jan 12, 2023

Awesome! Should we add an array type as well?

@emroot
Copy link
Contributor Author

emroot commented Jan 12, 2023

not needed as array is under InputJsonValue

// .prisma/client/index.d.ts
export interface InputJsonArray extends ReadonlyArray<InputJsonValue | null> {}
export type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray

emroot and others added 3 commits January 12, 2023 12:22
Co-authored-by: Arthur Fiorette <github@arthur.place>
Co-authored-by: Arthur Fiorette <github@arthur.place>
Co-authored-by: Arthur Fiorette <github@arthur.place>
@arthurfiorette
Copy link
Owner

not needed as array is under InputJsonValue

For some reason i have in my memories that when i tried to use /// @json("Type[]") it didn't work...

I no longer have this repo set up, can you just test it out for me? 😁

Copy link
Owner

@arthurfiorette arthurfiorette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@emroot
Copy link
Contributor Author

emroot commented Jan 12, 2023

gracias

@arthurfiorette arthurfiorette merged commit 861fe78 into arthurfiorette:main Jan 12, 2023
@emroot
Copy link
Contributor Author

emroot commented Jan 12, 2023

thanks for the quick review. Let me know when it's published. Kinda blocking me to deploy some of my changes.

@arthurfiorette
Copy link
Owner

@emroot just released v1.1.0 with it.

@emroot
Copy link
Contributor Author

emroot commented Jan 12, 2023

thanks. works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants