by moonforeshot · 9y ago · 0 comments
graphql can be designed to incorporate most of json-ld specs (and hydra too)...
Then everyone can benefit because it's machine-friendly-annotated data everywhere :)
The other idea I had is that it may help with transforming payloads from their serialized format into a static type system like TypeScript. It could be nice to have a system that can see an incoming response, validate the type using JSON-LD, and construct an instance of that object with it. It can be done without JSON-LD, but it may be useful.
Also, your idea is possible with current Typescript 2.3's language-server specs :)
But, this is quite separate from 'generic-machine understandable' data - which is what json-ld is all about.