Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 812 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 812 Bytes

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 !