graphql-decorator icon indicating copy to clipboard operation
graphql-decorator copied to clipboard

Any roadmap?

Open Axure opened this issue 8 years ago • 9 comments

Is this still in active development?

Axure avatar Oct 22 '16 08:10 Axure

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

zsfarkas avatar Oct 22 '16 12:10 zsfarkas

Interesting

orefalo avatar Jan 28 '17 12:01 orefalo

There is graphql-ts, but it is basically in the same state as graphql-decorator => proof of concept.

4F2E4A2E avatar Feb 04 '18 22:02 4F2E4A2E

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 avatar Mar 05 '18 20:03 pie6k

@pie6k great news! Are you planing to do something similar for the client-side?

4F2E4A2E avatar Mar 06 '18 11:03 4F2E4A2E

What exactly do you mean by that? @4F2E4A2E

pie6k avatar Mar 06 '18 12:03 pie6k

Enabling type safe queries using angular for example. Without literals and graphql-tag, etc.

4F2E4A2E avatar Mar 06 '18 15:03 4F2E4A2E

I think that should be totally possible! Let me know if you'd have any problem with that @4F2E4A2E

pie6k avatar Mar 07 '18 09:03 pie6k

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 😉

MichalLytek avatar Mar 14 '18 18:03 MichalLytek