2 ms·
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.
by nailer 8y 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.
- mlevental 8y agowhich two?
- nailer 8y agoUsually 2 and 3. Sometimes 1 and 3 (see http://avant.engineering/graphql-and-typescript/ http://avant.engineering/graphql-and-typescript/)
- bpicolo 8y agoThere 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 https://github.com/walmartlabs/lacinia
- infogulch 8y agographql-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 https://github.com/apollographql/graphql-tag