balena-io / pinejs

Generate rest APIs from natural language models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph-QL support

nazrhom opened this issue · comments

Internal discussions and user feedback have suggested the need to extend Pinejs to add support for GraphQL clients.

The idea is to offer graphql endpoint, alongside the current OData API to interact with the model.
To support this we need to take the following steps:

  • Generate a representation of the GraphQL types from the SBVR model.
  • Generate an API which is equally expressive as the OData one to interact with the data model. Graphcool does something similar already, we should attempt to be compliant with their spec as long as it does not hinder our implementation. In practice we probably should be able to support an extension of their API which is backwards compatible.
  • Expose a GraphQL endpoint which uses the GraphQL representation of the data model to validate and execute queries.