stepci / garph

Fullstack GraphQL Framework for TypeScript
https://garph.dev
MIT License
1.31k stars 17 forks source link

Zod Integration #45

Open mishushakov opened 1 year ago

mishushakov commented 1 year ago

Here's a proposal

  1. Create garph types from Zod types:
const type = g.zodType('name', yourZodType)
  1. Create garph scalars from Zod types:
const type = g.zodScalar('name', yourZodType)
  1. Create garph inputs from Zod types:
const type = g.zodInput('name', yourZodType)
  1. Create Zod types from Garph types:
type.toZod()
mishushakov commented 7 months ago

Hey folks, I'm seeing some of you have upvoted the issue (@christopher-caldwell, @binamralamsal, @raja-OX, @tyler-mitchell, @BurnedChris, @arthur-fontaine, @joshuabaker, @fenos, @hanssonduck, @ian-os, @sebastian-herrera, @mailaneel, @mihazs).

Maybe you'd be interested in sponsoring this feature in Garph? Let me know.

arthur-fontaine commented 7 months ago

👋 @mishushakov, sponsoring OSS is not in my student budget :/, but I could contribute and implement (or help to) this feature in some weeks (~4/5 I think) if you want.

christopher-caldwell commented 7 months ago

Unfortunately it's a no from me. I have started using Pothos.

mishushakov commented 7 months ago

Hey @arthur-fontaine thanks for showing up! If you have the time and the grit, you should totally give it a go. Once you have any proof-of-concept, feel free to post it here or link to a repository. I'd be glad to be assisting you in achieving this 😄

mishushakov commented 7 months ago

@christopher-caldwell Fair enough! Could you give us any feedback? What makes Pothos better than Garph in your eyes? Thanks for sticking around for so long 🙏