GithubHelp home page GithubHelp logo

Static Typing about graphql-tools HOT 14 CLOSED

jbaxleyiii avatar jbaxleyiii commented on April 30, 2024 1
Static Typing

from graphql-tools.

Comments (14)

helfer avatar helfer commented on April 30, 2024 2

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

from graphql-tools.

jbaxleyiii avatar jbaxleyiii commented on April 30, 2024 1

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

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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

from graphql-tools.

jbaxleyiii avatar jbaxleyiii commented on April 30, 2024

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

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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: 👍]


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

from graphql-tools.

jbaxleyiii avatar jbaxleyiii commented on April 30, 2024

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

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

Yeah, thanks, I really appreciate it!

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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
#6 (comment)

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

@jbaxleyiii Any update on this?

from graphql-tools.

jbaxleyiii avatar jbaxleyiii commented on April 30, 2024

@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

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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

from graphql-tools.

paralin avatar paralin commented on April 30, 2024

Are there any plans to make typings for this?

from graphql-tools.

helfer avatar helfer commented on April 30, 2024

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

from graphql-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.