Hacker News new | ask | show | jobs
by nailer 2886 days ago
I'm holding off until I don't have to define types in 3 places:

1. TypeScript

2. Document database

3. GraphQL

I know there are things that do two of these. I want all three.

3 comments

There are stacks that can give you delicious sharing here. Clojure/clojurescript with Lacinia[0] for example could lead to something pretty terrific, as Clojure DB access is all immutable structs instead of activerecord-style stuff.

[0]: https://github.com/walmartlabs/lacinia

graphql-tag [1] is very close to automatic typing for TypeScript. It lets you import a `x.gql` file (or whatever suffix) that contains query text directly, and translates the contained queries into named input/output types and parsed query documents based on your schema.

It's great but it's not quite perfect for me: I'd prefer if it produced a function that accepts your query executor and inputs, and returns an observable of the result, and it doesn't work very smoothly with angular (especially 5+).

[1]: https://github.com/apollographql/graphql-tag

which two?
Usually 2 and 3.

Sometimes 1 and 3 (see http://avant.engineering/graphql-and-typescript/)