graphql-decorator
graphql-decorator copied to clipboard
Any roadmap?
Is this still in active development?
I asked him before. The answer was no. Here is the e-mail:
Hi Zsolt.
Thanks for your mail.
Do you think it has a future
Sorry, I'm not maintaining this repository. And I don't recommend to use it. I've created this lib for proof-of-concept, which is "Can I reuse TypeScript type information to define GraphQL Schema type". However it's not effective... For example:
export class MySchema {
@Field()
name() {
return new Promise<string>(resolve => /* some async fetch procedure */);
}
}
In GraphQL the name field has String type but in TypeScript the name function returns not string but Promise. So there is type mismatch and I should re-annotate that "the field is GraphQL string type" to the name function. I think it's not cool and fatigue...
Do you now any similar frameworks, which do something similar?
I don't. Please tell me if you find it ;)
2016-10-06 5:59 GMT+09:00 Zsolt Farkas [email protected]: Hey Yosuke,
I found your project ‚graphql-decorator‘, which i find amazing. It is a really nice idea. I am thinking about using it, but I am not sure, because you are the only contributor. Do you think it has a future?
Do you now any similar frameworks, which do something similar?
Thank you and kudos to you,
Zsolt Farkas a developer from Germany
Interesting
There is graphql-ts, but it is basically in the same state as graphql-decorator => proof of concept.
Since this repo does not really feel active, I've created my own library allowing creating schema with decorators -
https://github.com/prismake/typegql
@pie6k great news! Are you planing to do something similar for the client-side?
What exactly do you mean by that? @4F2E4A2E
Enabling type safe queries using angular for example. Without literals and graphql-tag, etc.
I think that should be totally possible! Let me know if you'd have any problem with that @4F2E4A2E
If someone is looking for an alternative framework which do something similar, you can take a look at TypeGraphQL 🎉
@4F2E4A2E
You can use apollo-codegen
to generate interfaces for your queries. Doing it by classes with decorator just for type safe seems like an overkill for me 😉