dangcuuson / graphql-schema-typescript

Generate TypeScript from GraphQL's schema type definitions
190 stars 36 forks source link

Generate `AsyncIterator<TResult>` as signature for Subscription Field Resolvers #13

Closed oscarnylander closed 5 years ago

oscarnylander commented 5 years ago

Hi!

First off, thank you for the nice library.

I'd like to update the generated type signature for Subscription Field Resolvers subscription field, as Apollo expects the return type of this field to be an AsyncIterator<T> where T: TReturn in this case.

I'm open to helping with any compatibility issues or similar things that come up from this changes.

Best Regards

dangcuuson commented 5 years ago

Hi,

That's a nice catch, thank you for the improvement. :+1: I have merged your changes to 1.2.7, and will keep you informed if any compatibility issues arise.

Cheers