Skip to content

Convert a static YML-file-based DB to GraphQL compatible DB like dgraph.

Notifications You must be signed in to change notification settings

stackdb-info/yml_to_graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yml_to_graphql

Convert a static YML-file-based DB to GraphQL compatible DB like dgraph.

Usage

  1. Create your YML-file-based DB by creating

    • A schema definition file schema.graphql
    • A directory containing a sub-directory for each type in your schema and YML files defining instances of those types.

    Example: https://github.com/stackdb-info/db

  2. Define ENV variables and run the converter

    • SCHEMA_PATH : Path to your schema file
    • YML_DB_PATH : Path to the root of directory containing type directories
    • GRAPHQL_SERVER : DGraph entrypoint

    See package.json for start command example.

  3. Run node populate.js. You're done !

About

Convert a static YML-file-based DB to GraphQL compatible DB like dgraph.

Resources

Stars

Watchers

Forks