Graphql-js: There is no @types/graphql for typescript 2

Created on 24 Sep 2016  路  8Comments  路  Source: graphql/graphql-js

Will there have @types/graphql for typescript 2 ?

Most helpful comment

Would be great to see these types put in the types mechanism, though the workaround above does work well.

All 8 comments

you can use typed-graphql

Would be great to see these types put in the types mechanism, though the workaround above does work well.

It would be great if this types come with graphql package together, though @types/graphql will be ok.

Closing this. We're not committing to maintaining a separate typescript definitions file for this repo, however I encourage using definitely-typed and typed-graphql as community efforts.

To help anyone else who arrives here from a search: the typed-graphql work is now published as part of the TS2 types mechanism, you can ise the standard npm i @types/graphql.

(Because the GraphQL doesn't maintain these though, it's likely there will be some latency between future GraphQL updates and typing changes. I am just a passerby who uses these things, I'm not involved neither project, though I do have a dream that someday a bridge could be built between the different communities adding types to JavaScript in different ways.)

@kylecordes it seems npm's typed-graphql https://github.com/nitintutlani/typed-graphql (1.0.2) and @types/graphql (0.7.1) are a little bit different things inside, is it supposed be this way? Wonder where is the source of @types/graphql located.

@whitecolor It's not clear to me what the differences are and why. I'm just a passerby trying to fill in some missing bits to help future GraphQL beginners who land here. Maybe the people who published these bits will pop up with an explanation of the provenance and differences. @types/graphql appears to arrive from the DefinitelyTyped repo: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/graphql .

Ok, typings seem to have a like parts but has some differences. I've asked it here https://github.com/nitintutlani/typed-graphql/issues/32

Was this page helpful?
0 / 5 - 0 ratings