Closed timotheecour closed 6 years ago
Hmm, it would definitely be possible, but I'm not sure if there's any benefit to it. If you look at how the json module in the stdlib is implemented, something similar could be done for GraphQL. If that doesn't make the usage easy enough then you could of course write a DSL that set up more stuff, but I think that would be a good place to start.
@PMunch just curious what are your thoughts on this, sorry it's not related to protobuf proper.
graphql seems like the future for web services, advantageously replacing REST in most use cases; unfortunately all I could find is this project https://github.com/samdmarshall/GraphQL.nim that wraps around C++ libgraphqlparser wrapping around libgraphqlparser doesn't lead to ease of use for user code, leading to lots of boilerplate code; ideally using graphql and parsing schema and queries should be as simple as in javascript via a DSL (eg https://graphql.org/graphql-js/).
I'm wondering whether a new protobuf-nim could serve as basis for a new graphql-nim project that would have same principles and ease of use as protobuf-nim (in particular compile time parsing). eg:
links
https://forum.nim-lang.org/t/3321 GraphQL? https://github.com/samdmarshall/GraphQL.nim/issues/1 https://github.com/graphql-python/graphene/blob/master/examples/simple_example.py python API https://graphql.org/graphql-js/ javascript API