nitintutlani / typed-graphql

Typescript type definitions for graphql [Not Active]
MIT License
37 stars 17 forks source link

`@types/graphql` typings? #32

Closed wclr closed 7 years ago

wclr commented 8 years ago

Are those typings published as @types/graphql: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/graphql/graphql.d.ts

has reference to current repo?

kylecordes commented 8 years ago

My questions, which probably echo some others floating around, are:

wclr commented 8 years ago

At least which I find: This module exports GraphQLResolveInfo from grapqhl and @types/graphql doesn't.

cc @calebmer @TonyPythoneer

calebmer commented 8 years ago

If you find something missing or different in the @types/graphql definitions and this repo please contribute the changes! You don’t even have to clone the repo just edit on GitHub :wink:

Personally, I’d like to see @types/graphql become the canonical definition as it can leverage the infrastructure of DefinetlyTyped to automate publishing, and it is easily discoverable by community tools.

Also, GraphQLResolveInfo is exported, follow:

wclr commented 8 years ago

@calebmer code installed from npm @types/graphql differs from sources you refer to

And this is a screen: image

wclr commented 8 years ago

If you find something missing or different in the @types/graphql definitions and this repo please contribute the changes! You don’t even have to clone the repo just edit on GitHub

But the code is just different.

calebmer commented 8 years ago

Yep, looks like they hadn’t been updated in the types-2.0 branch. Sent a PR to change this here: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12417 :+1:

TonyPythoneer commented 8 years ago

@kylecordes

  1. First, the DefinetlyTyped/graphql asserts type according to each module. If you don't want to import all methods or properties from graphql, you can import something specified from graphql/xxx. Second, it's good to maintain when contributors will want to contribute in the future. But it's sorry, typed-graphql is messy for me.
  2. Now, the DefinetlyTyped/graphql is 0.7.0 and the source is 0.7.2. The version definition of DefinetlyTyped/graphql is following source code to define. I believe DefinetlyTyped/graphql is up-to-date with source code.
  3. I would like to use this occasion. I want to declare I hope everyone to maintain graphql definition file on DefinetlyTyped, not in a personal repository. It's because every typescript developer doesn't expect a definition type is from outside of DefinetlyTyped.

@whitecolor I have no time to maintain types-2.0. I only have maintained definition files from master branch. If you are interested in it, we can maintain these definition files.

wclr commented 8 years ago

@TonyPythoneer Who is supporting TS2 branch currenlty? @calebmer?

@nitintutlani @calebmer What do you think about migrating to DefinetlyTyped/graphl and probably depricate this repo in favor of the first?

TonyPythoneer commented 8 years ago

@whitecolor Currently, I and @calebmer aren't supporting TS2. We need time to understand correct TS2 maintain procedures.

intellix commented 8 years ago

I've done a PR against @types/graphql to the types-2.0 branch. Would love an extra pair of eyes to check through it https://github.com/DefinitelyTyped/DefinitelyTyped/pull/12735

intellix commented 7 years ago

The 0.8.2 graphql types were merged into DefinitelyTyped btw. Maybe this issue can be closed and a notice pushing people there be added to this repository. More people looking after the official types and we'll have more community support there

DxCx commented 7 years ago

Thanks @intellix !

nitintutlani commented 7 years ago

Typescript @types support is a welcome change. DefinatelyTyped is a community contribution and Facebook still doesn't provide official types for graphql.

masaeedu commented 7 years ago

@intellix Maybe this issue should be kept open until CI is added. Manually updating the types in dt periodically is not sustainable.