Licensed to be used in conjunction with basebox, only.
bbc - basebox Compiler Reference
The basebox Compiler exposes the power of PostgreSQL (Postgres) via GraphQL. It does this by taking a novel approach of converting GraphQL to Postgres' Structured Query Language (SQL). In other words, you define the data structures of your application in GraphQL and the Compiler creates the corresponding data model in Postgres. The Compiler also creates a few other files that then goes into running our DBProxy server, thus creating a GraphQL interface to the newly created database. You can then model GraphQL operations that would query and mutation the created database.
If you would like a guided tour of the compiler functionality, please refer to the bbc guide.
basebox Compiler - bbc
The basebox compiler executable
bbc takes an annotated GraphQL schema as input and produces files necessary to run the basebox GraphQL server software together with a generated PostgreSQL database/s that the servers connect to.
bbc [OPTIONS] <FILENAME>
path and filename of GraphQL schema to compile
Output directory for generated files; default is current
Prefix for file name generation; defaults to the base name of the input file
Overwrite existing output files?
Print help (see more with '--help')
Print version stamp
bbc generates the following files:
The Compiler uses the type definitions in the GraphQL schema file provided to generate a database creation script; this file contains that script. This script needs to be run in PostgreSQL against a database to create the necessary database structures.
The resolver file contains a compiled version of the operation resolvers specified in the scheam file. This is required by the dbproxy in order to fulfill operation requests and is linked to the dbproxy via the dbproxy configuration file.
The type map creates a map between GraphQL types and structures and database tables and structures. This is required by dbproxy and is linked to the dbproxy via the dbproxy configuration file.
Together with these three files, the broker and dbproxy also need access to the GraphQL schema file; this is configured in their respective