devoyage-subgraph 0.0.15

Subgraph is a CLI that instantly generates a GraphQL API around Mongo, SQL, and HTTP APIs.
Documentation
[service]
name = "restaurants"
port = 3032
log_level = "debug"

[[service.data_sources]]
[service.data_sources.SQL]
name = "restaurants"
uri = "postgre://root:rootroot@localhost:5432/mydb"
dialect = "POSTGRES"

[[service.entities]]
name = "restaurants"

[service.entities.data_source]
from = "restaurants"
table = "restaurants"

[[service.entities.fields]]
name = "id"
scalar = "Int"
required = true
exclude_from_input = ["CreateOne", "UpdateOne"]

[[service.entities.fields]]
name = "name"
scalar = "String"
required = true

[[service.entities.fields]]
name = "is_open"
scalar = "Boolean"
required = true

[[service.entities.fields]]
name = "rating"
scalar = "Int"
required = true