Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Typing #6

Closed
jbaxleyiii opened this issue Mar 31, 2016 · 14 comments
Closed

Static Typing #6

jbaxleyiii opened this issue Mar 31, 2016 · 14 comments

Comments

@jbaxleyiii
Copy link

@helfer do you want me to go through and setup typescript like we did with apollo-client?

@helfer
Copy link
Contributor

helfer commented Mar 31, 2016

@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?

@jbaxleyiii
Copy link
Author

@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 👍

@helfer
Copy link
Contributor

helfer commented Mar 31, 2016

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 notifications@github.com
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: 👍]


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
apollographql/apollo-server#6 (comment)

@jbaxleyiii
Copy link
Author

@helfer sounds great! Just wanted to offer help :)

@helfer
Copy link
Contributor

helfer commented Mar 31, 2016

Yeah, thanks, I really appreciate it!

@helfer
Copy link
Contributor

helfer commented Apr 9, 2016

@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!

@jbaxleyiii
Copy link
Author

@helfer happily! It'll help me get a feel for what's happening as well so I can contribute!

@helfer
Copy link
Contributor

helfer commented Apr 9, 2016

awesome, thanks a lot!

On Sat, Apr 9, 2016 at 4:51 AM, James Baxley notifications@github.com
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
#6 (comment)

@helfer
Copy link
Contributor

helfer commented May 4, 2016

@jbaxleyiii Any update on this?

@jbaxleyiii
Copy link
Author

@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

@helfer
Copy link
Contributor

helfer commented May 4, 2016

No worries, I was just going through all the issues to see which ones I could close :)

@helfer
Copy link
Contributor

helfer commented Jul 8, 2016

Closing this since I don't think it's on our immediate agenda any more now that Apollo Server has been rewritten in TypeScript.

@paralin
Copy link

paralin commented Aug 9, 2016

Are there any plans to make typings for this?

@helfer
Copy link
Contributor

helfer commented Aug 9, 2016

Yes, @pcarrier is converting things to TypeScript as we speak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants