@helfer do you want me to go through and setup typescript like we did with apollo-client?
@jbaxleyiii I think static typing would be nice to have, but I'm a bit torn. Apollo-client is essentially standalone, so the choice of going with typescript made sense. Because apollo-server relies heavily on graphql-js, which is written in flow, I don't think it would make sense to use typescript for it.
We could use flow for apollo-server, but then we'd have the client written in typescript and the server written in flow, which also isn't ideal.
I'm definitely open to using static typing, but because of the above I think it would have to be Flow, and not Typescript. Do you think the benefits of static typing in apollo-server will be worth adding another language to our stack?
@helfer fwiw, we found that graphql-js doesn't export flow definitions so where we are using it in apollo-client we went with typescript because the definitions were much more readily available. Flow also doesn't currently support exporting of definitions like typescript does.
I'm open to whatever though :+1:
Let me write a bit more code in JavaScript and then see what the equivalent
would look like in Typescript. Right now the whole implementation in the
vanilla-parser branch is down to about 10 lines of effective code (except
for tests), so it's not enough for a comparison.
On Thu, Mar 31, 2016 at 4:23 PM, James Baxley [email protected]
wrote:
@helfer https://github.com/helfer fwiw, we found that graphql-js
doesn't export flow definitions so where we are using it in apollo-client
we went with typescript because the definitions were much more readily
available. Flow also doesn't currently support exporting of definitions
like typescript does.I'm open to whatever though [image: :+1:]
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/apollostack/apollo-server/issues/6#issuecomment-204171913
@helfer sounds great! Just wanted to offer help :)
Yeah, thanks, I really appreciate it!
@jbaxleyiii I've added some relatively intricate logic for mocking in the last few days, and I sometimes wished I had static typing. If you have some time next week to make a typescript branch, that would be great!
@helfer happily! It'll help me get a feel for what's happening as well so I can contribute!
awesome, thanks a lot!
On Sat, Apr 9, 2016 at 4:51 AM, James Baxley [email protected]
wrote:
@helfer https://github.com/helfer happily! It'll help me get a feel for
what's happening as well so I can contribute!—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/apollostack/graphql-tools/issues/6#issuecomment-207776927
@jbaxleyiii Any update on this?
@helfer sadly no 👎 It is still on my to-do list! With vacation and coming out to SF I haven't gotten to it yet. I'm hoping to finish it this weekend
No worries, I was just going through all the issues to see which ones I could close :)
Closing this since I don't think it's on our immediate agenda any more now that Apollo Server has been rewritten in TypeScript.
Are there any plans to make typings for this?
Yes, @pcarrier is converting things to TypeScript as we speak.
Most helpful comment
No worries, I was just going through all the issues to see which ones I could close :)