The Alpha bread
Pre-releaseWell here we are. The damn thing kinda really actually works πβπ¨. You can do the core schtick of having markdown files in your repo get automatically converted to a schema consisting of GraphQL typedefs + resolvers that retrieve that data.
That gives a real swell experience. The end user doesn't have to give two shits about what's going on behind the scenes. They can just declare where their data is, the typeName of it, wait a moment while magic little ferrets and goats rummage around in the console as their server starts alongside their pretty web app, then query the data in those flat file suckers by their id (obviously way more queries will be added for each content type, but this is the proof of worth moment I've been waiting on for a grand total of 17 short days, so I would say very cool and awesome and dope and sick, in fact) and it shows up on your screen!
Oh I also completely ripped out the GraphQL server in the CLI and slapped in Apollo Server (as pictured above). The CLI itself saw a bunch of tweaks and now the GraphQL server stands alone and does its own Flatbread thing, encapsulating the functions from the core and config packages. The CLI is kinda just a pretty scheduler and watcher over the Flatbread/GraphQL server process and your other script.
Bonus point, you can totally roll your own GraphQL server while making use of Flatbread without even touching the flatbread package. You literally only need these two functions to plug the resultant GraphQL schema into whatever you want:
import {loadConfig} from '@flatbread/config';
import generateSchema from '@flatbread/core';
const config = await loadConfig();
const schema = await generateSchema(config);
...Take a look at flatbread/src/graphql/server.ts for an example on how to roll your own GQL server & editor.
