What’s the best way to keep Typescript definitions...
# orm-help
h
What’s the best way to keep Typescript definitions in sync with the GQL schema?
n
are you using
graphql prepare
for
prisma-binding
?
h
Nope, didn’t know about that command. But I’m looking for a general way to generate TS typedefs from schemas, for use both for the DB schema from Prisma, the server schema and on the client side.
n
that's literally
graphql prepare
🙂 looks into your
.graphqlconfig
and can generate TS bindings for any project you enter in there
we'll soon introduce
graphql codegen
to make that workflow even simpler 🙂
h
That sounds great, thanks. I’ll look into it 🙂
n
@tim2 is there already an example for
graphql codegen
? 🙂
h
n
no 🙂
h
Ah, roger. Is there any difference between that and Apollo’s codegen, or is it the same thing?
t
n
graphql codegen
combines different code generation tasks (also schema bundling and different generators), Apollo's codegen is one of them
👌 2
h
Sounds pretty awesome! 🙂 I’ll keep an eye out. Where will it be announced when it’s ready?
t
@halborg we will announce it next week in the #announcements channel 🙂
🎉 1
🤫 1