Store your content with Git (easy revision control)
Consume your content with GraphQL (fetch what you need)
hub clone joshnuss/cql
cd cql
yarn
mkdir example
Create a .schema.json
file to describe your data strucure, here's an example:
{
"teams": {
"type": "Array",
"of": "team"
},
"team": {
"type": "Object",
"description": "A collection of members",
"fields": {
"id": "id",
"name": "String",
"members": {
"type": "Array",
"of": "member"
}
}
},
"member": {
"type": "Object",
"description": "A single person on the team",
"fields": {
"id": "id",
"name": "String",
"position": "String",
"email": "String"
}
}
}
Create a teams.json
file to store your data, here's an example:
[
{
"id": "engineering",
"name": "Engineering",
"members": [
{
"id": "joshnuss",
"name": "Josh Nussbaum",
"email": "[email protected]"
}
]
}
]
yarn start
Visit http://localhost:4000 to test queries and subscriptions
MIT