Can i auto-generate TypeScript `interface`s from t...
# prisma-whats-new
n
Can i auto-generate TypeScript `interface`s from the
schema.graphl
-file in
yoga
? Currently i'm defining all models twice, once in GraphQL SDL and once in TypeScript...
i
Apollo has a pkg
h
I'm pretty sure prisma can do it for you
i
apollo-codegen
graphql-cli
has a wrapper over
apollo-codegen
, I think
h
yea, something like that
pretty sure it gets generated with the typescript template
but could be wrong
i
πŸ€·β€β™€οΈ
n
a
@Nick Luger Had also the same question: https://github.com/graphcool/prisma/issues/1860 πŸ™‚
n
Did you fix the import issue @andre?
a
Yeah, I did. Do you face the same problem?
n
Yes
a
Hm, can I see your schema?
n
These are the only imports
# import Image, DateTime from "./generated/prisma.graphql"
a
Ah, I remember. The problem wasn’t relevant anymore, because I changed to a completely different schema (with own types, etc.)
n
What's your solution for datetime?
In the output they will be strings anyway, but i'm not sure whether this is correct.
a
I don’t have any
DateTime
fields at the moment. Do you see the same error, when removing this import?
n
No. It works without them πŸ™‚
a
πŸ™‚
Well … I guess, we have to file a separate issue for that. Could you create a new one? I guess, you have the freshest memories at the moment on how to reproduce this beast πŸ™‚
n
Will do that, thank you @andre! πŸ™‚
a
Awesome. Thank you! πŸ™‚
n