{"_id":"migrate-to-graph","_rev":"84-37fa712b1ac217c26a4dcedae991139a","name":"migrate-to-graph","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"migrate-to-graph","version":"0.0.1","keywords":["graph","gremlin","database","migrate","graph-database","migration-tool","cosmosdb"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"migrate-to-graph@0.0.1","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/Microsoft/MigrateToGraph#readme","bugs":{"url":"https://github.com/Microsoft/MigrateToGraph/issues"},"bin":{"migrate-to-graph":"./lib/cli.js"},"dist":{"shasum":"c3a3090290466bcb15b7825b4d9b08727779b59d","tarball":"https://registry.npmjs.org/migrate-to-graph/-/migrate-to-graph-0.0.1.tgz","fileCount":42,"integrity":"sha512-K1h97psTr6Ea/2c6ALha3XpH+b2tYN1ymlhk9OYreNc8xLRF5cbWXGX67oTtmXCOV9T4BHxfal/2uld4evhY1Q==","signatures":[{"sig":"MEUCIH2Vj7vf5mNN4jmMisDpT1Yg2RdncYTU3MLQgBvQhVc/AiEAlK0zoBYk/zKWiTl3zs83f05+n3ewIyY/JCVx7KFlLs0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcT16ECRA9TVsSAnZWagAAN+wP/2OO9TXpyYXP4Idi2i7u\nQjLSAZJKPAuafLUG1qBpQ9UK8O3QZoeqX/GZ3NGPBGXg3l11MLbFXOadiMiV\nScy9URTzBwlXi3G0wSdYBI5r1eY7f64G8eVgzFx7U+5F9t+ncHADpw+NPc+5\nld7LNZ3B4Sls2LVLYcIG6I7He7MLqKxTJxOHV3Q6z5VKpBUIp3tbBXy8xOZ7\niOhIWu9bT+fxcxHekeugCDVCNRMjP6Kdzn5okJEnqSMCzjzNBaS5QRiysf2V\nzQGD53u2hdplTbBNjfU5nrbe0OJPy7m84HJlSgFiQFuQ7mR/MEfhRIC5GiLY\naBntRAokeXnydtpu/P8o3ZivLxGnraH9W8jkjov9940aW0jiLXWtlsbkMs61\nz5YBHxen2EMQiebkizdUtjYPC/VUNe7b7wMxzGk4GiaYBjjbyxFiAOF150D7\nDRlMglR/+GgoH2lE8ocKEB0JLvPf33yTV9eU56N5oksTRfEmT08jzb4mZh7Q\nYL6k/CizFAPNkztvlBxQIkdn9bMq2/sDsf8kaPgGKO0f2xzHfM+osU7Rq/gr\nv8iRFQFOphwvB64wdDQI0yH2WQ+LRxloIOvdteLS9OzyHSaicwJa91ky4Hpb\nmTHeC7xbH0bnPgeXtRuzK/YK+tZJsD4qS7eFkgtxSDglb0Ei7eSmQZrB9SzN\n2x5k\r\n=8E+A\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|js)$","transform":{".(ts)":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","js"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"f8f7d078b6d1f236408e61cf78bd59f2c16f4c80","scripts":{"lint":"tslint --force --format verbose \"src/**/*.ts\"","test":"jest","build":"tsc --pretty","clean":"rimraf lib && rimraf coverage","start":"ts-node ./src/index.ts","watch":"npm run build -- --watch","format":"prettier --write \"{src,__tests__}/**/*.ts\" --single-quote --trailing-comma es5","coverage":"jest --coverage","prebuild":"npm run clean && npm run format && npm run lint && echo Using TypeScript && tsc --version","gen-schema":"typescript-json-schema tsconfig.json GraphInfo --required -o src/schema/graph-schema.json","watch:test":"jest --watch","prepublishOnly":"npm run build"},"typings":"lib/index.d.ts","_npmUser":{"name":"microsoft","email":"npmjs@microsoft.com"},"repository":{"url":"git+https://github.com/Microsoft/MigrateToGraph.git","type":"git"},"_npmVersion":"6.5.0","description":"A tool to migrate existing database to a graph database","directories":{},"_nodeVersion":"8.11.3","dependencies":{"pg":"^7.6.0","ajv":"^6.5.4","uuid":"^3.3.2","async":"^2.6.1","mssql":"^4.2.2","mysql2":"^1.6.1","gremlin":"^2.7.0","sqlite3":"^4.0.3","fs-extra":"^7.0.0","jsonlint":"^1.6.3","commander":"^2.19.0","pg-hstore":"^2.3.2","sequelize":"^4.41.0","handlebars":"^4.0.12","convert-hrtime":"^2.0.0","json-source-map":"^0.4.0","single-line-log":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","rimraf":"^2.0.0","tslint":"^5.0.0","ts-jest":"^23.6.0","ts-node":"^7.0.1","prettier":"^1.14.3","coveralls":"^3.0.2","typescript":"^3.1.3","@types/jest":"^23.3.7","@types/node":"^8.10.36","@types/uuid":"^3.4.3","@types/async":"^2.0.50","@types/mssql":"^4.0.8","@types/fs-extra":"^5.0.4","@types/sequelize":"^4.27.29","@types/handlebars":"^4.0.38","@types/convert-hrtime":"^2.0.0","@types/single-line-log":"^1.1.0","tslint-config-prettier":"^1.1.0","typescript-json-schema":"^0.34.0"},"_npmOperationalInternal":{"tmp":"tmp/migrate-to-graph_0.0.1_1548705412008_0.22288282185302544","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"migrate-to-graph","version":"0.0.2","keywords":["graph","gremlin","database","migrate","graph-database","migration-tool","cosmosdb"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"migrate-to-graph@0.0.2","maintainers":[{"name":"abcy","email":"abcy@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/Microsoft/MigrateToGraph#readme","bugs":{"url":"https://github.com/Microsoft/MigrateToGraph/issues"},"bin":{"migrate-to-graph":"./lib/cli.js"},"dist":{"shasum":"e7ddfaaebf23e340bdffd0ca670e117c9c70bca9","tarball":"https://registry.npmjs.org/migrate-to-graph/-/migrate-to-graph-0.0.2.tgz","fileCount":42,"integrity":"sha512-hZl7L3rv81wiJCdrpmcZrBgvAkzKPSldDnVDSNxzKS2e55ahvG8KDMJoFTo1OO7Fs0aU2qkM+aL8jUubN2GqwQ==","signatures":[{"sig":"MEUCIHSIWuCa6g46i8Spw7YqRJH3QRFHUoQQ8xJgcyqOaQOBAiEA6jyxfRLM5I8Gi0Czdjb3cI7rv/4fQswHWl+PLkWA94c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUBV1CRA9TVsSAnZWagAAZCUP/26Af1aXg4elmiyiUeOD\nw0MhVpYTJljVxp6ITI6f7SUcYJ+2uHeGXyE8mZT0nAwXi6uw5IVpspqI8kId\n4K96T8clrY6RkMVFoclqRyDBv+obLkycQRLPx2HnA3TeJF5+Q3SL7vqZjkqy\nrmTMuN8TcTCwBqVga0CjKOqsHayJXl3WL7N885EupFPnVmb2G1w+ttBvirOS\njDqcKaNJbX0ltMXjOPiVOj6ENtJtEpMMqgAWAsMa4UVWO++DgVa22FmaGm9p\nQHIA2f+tF95SuYgKlDB4Tmw8K3bwgZzPi6kwwBspR9JPu9iCnWndREjUnKCX\np1fbvccEYKresGtRezIxCu772bIPi6oArgmVQBpRyd3x6qGU0yKnnDXgdMMM\ny2DQRsvCg8Kz7chk/6XKglRr3yIRZ9AQy7FgyWXOE1XMq/KROJYnlKm0dDJa\nFitNDDpZmAUm8kdD/DhD8JO0NTA4NpbBNF1Qquh2ZylTAhox2mpQbawYPbE/\nfnXXxjX8BOmVLf/YzDsO5JSdlbs0C8U1V+CNOyt5bReWWB4M6VD4UKw/n6Wd\nMwlczoF5hP56dbDPsFQURmA7w5cbKDFVKNmAZjESQhzWD/MIqvCHgjqZkVfQ\npARH8hDNEG29nQvsQbuGm45WH9YyLCK0r1KyjT43/iKPflqOc7jHEOXY7rg7\nRYb8\r\n=5pw3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|js)$","transform":{".(ts)":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","js"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"dce99fa89005f20e23f58fbeed40f5298357e9af","scripts":{"lint":"tslint --force --format verbose \"src/**/*.ts\"","test":"jest","build":"tsc --pretty","clean":"rimraf lib && rimraf coverage","start":"ts-node ./src/index.ts","watch":"npm run build -- --watch","format":"prettier --write \"{src,__tests__}/**/*.ts\" --single-quote --trailing-comma es5","coverage":"jest --coverage","prebuild":"npm run clean && npm run format && npm run lint && echo Using TypeScript && tsc --version","gen-schema":"typescript-json-schema tsconfig.json GraphInfo --required -o src/schema/graph-schema.json","watch:test":"jest --watch","prepublishOnly":"npm run build"},"typings":"lib/index.d.ts","_npmUser":{"name":"abcy","email":"abcy@microsoft.com"},"repository":{"url":"git+https://github.com/Microsoft/MigrateToGraph.git","type":"git"},"_npmVersion":"6.4.1","description":"A tool to migrate existing database to a graph database","directories":{},"_nodeVersion":"10.13.0","dependencies":{"pg":"^7.6.0","ajv":"^6.5.4","uuid":"^3.3.2","async":"^2.6.1","mssql":"^4.2.2","mysql2":"^1.6.1","gremlin":"^2.7.0","sqlite3":"^4.0.3","fs-extra":"^7.0.0","jsonlint":"^1.6.3","commander":"^2.19.0","pg-hstore":"^2.3.2","sequelize":"^4.41.0","handlebars":"^4.0.12","convert-hrtime":"^2.0.0","json-source-map":"^0.4.0","single-line-log":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^23.6.0","rimraf":"^2.0.0","tslint":"^5.0.0","ts-jest":"^23.6.0","ts-node":"^7.0.1","prettier":"^1.14.3","coveralls":"^3.0.2","typescript":"^3.1.3","@types/jest":"^23.3.7","@types/node":"^8.10.36","@types/uuid":"^3.4.3","@types/async":"^2.0.50","@types/mssql":"^4.0.8","@types/fs-extra":"^5.0.4","@types/sequelize":"^4.27.29","@types/handlebars":"^4.0.38","@types/convert-hrtime":"^2.0.0","@types/single-line-log":"^1.1.0","tslint-config-prettier":"^1.1.0","typescript-json-schema":"^0.34.0"},"_npmOperationalInternal":{"tmp":"tmp/migrate-to-graph_0.0.2_1548752245364_0.9089919065945369","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"migrate-to-graph","version":"0.2.0","keywords":["graph","gremlin","database","migrate","graph-database","migration-tool","cosmosdb"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"migrate-to-graph@0.2.0","maintainers":[{"name":"abcy","email":"abcy@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/Microsoft/MigrateToGraph#readme","bugs":{"url":"https://github.com/Microsoft/MigrateToGraph/issues"},"bin":{"migrate-to-graph":"./lib/cli.js"},"dist":{"shasum":"f24fb1370efcaced232cc2aa85ea2c7c7929e134","tarball":"https://registry.npmjs.org/migrate-to-graph/-/migrate-to-graph-0.2.0.tgz","fileCount":52,"integrity":"sha512-lJsqw9AOUYKDzn9ZiyYdQWiL5Dyth3uMuGu7+aSgLhpYnvtFf8T7N7nZoIjnZuKWlNk4q2xZ7qwh7493uHwyUA==","signatures":[{"sig":"MEYCIQDssdss1cQMixT1chjkRBn8eZjmRXuUC34biUbTpTUlLgIhAOihKfXpTGDIGNeo6MyRzK/LAfCJMRk6AE88YCOMnvLm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":88704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrJbwCRA9TVsSAnZWagAAumkP+QABpj1z1/FNnTf6BAo3\nHfUyZNjOHmHYcLZrAAALddiFHgwOi2qeLsHWyvRbI5nQDqljwqO6HJGa4sHj\n5bhrA81RH8gWFWXYvzfz1EfpqbYoSYCd+pwazD5JF4fy+D2LPUBORny3ktk6\nVwlnRqjwba4vptiBZapmwe6W62yxgj8oCJoa4SB+DBy3LeqNixRKjhKTaYQG\nRPVlTLNGH+zlZ7tUwBHxY8hQ+ma2tGpZigmtnQTVcxKthUw3yRVRIMgFPKOT\nCVXlnE8LU2knm2yCjJKRoE44YIQJMyMi06B1y+33B0Du2frA8+NjFLtZt0U8\n8AvjoO27vWffW6X310JtOKvCGvFVGa1vd45+y69mTMOb2POqajcmsLCic0Ur\nao1b3k6MuLnuZezDJcZcnrJlyx+kHrgFJuuwWGI6nWh1yx+op+RM7qkbwjwt\nvz9d1RAXhrupHF+lLJ1Jd08k4B7QhqszY8PmhGBN7QOZW/2/rGsDjCed++LH\nhuBo58cOVf9lbBydfi8SCfpvIS/zKg33FL+Bj6CNSYgLNz29fwO4dQd/Tzgk\nUFw1VKxj+j7A9S2AAqWGPlC4MoC/O9Iu2URsbOUP4keYl+OERsyiSnwQX8C5\nHmIJHS9F38np6NlG2jkM1PyOSWmoEiXX74kGf3ebvK0Bnjxonztp1UlY3SZU\n4kWY\r\n=ZBz5\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|js)$","transform":{".(ts)":"ts-jest"},"testEnvironment":"node","moduleFileExtensions":["ts","js"]},"main":"lib/index.js","engines":{"node":">=6.0.0"},"gitHead":"19e90667d64f9ac0a92955bbd09e0159f3ab9668","scripts":{"lint":"tslint --force --format verbose \"src/**/*.ts\"","test":"jest","build":"tsc --pretty","clean":"rimraf lib && rimraf coverage","start":"ts-node ./src/index.ts","watch":"npm run build -- --watch","format":"prettier --write \"{src,__tests__}/**/*.ts\" --single-quote --trailing-comma es5","coverage":"jest --coverage","prebuild":"npm run clean && npm run format && npm run lint && echo Using TypeScript && tsc --version","gen-schema":"typescript-json-schema tsconfig.json GraphInfo --required -o src/schema/graph-schema.json","watch:test":"jest --watch","prepublishOnly":"npm run build"},"typings":"lib/index.d.ts","_npmUser":{"name":"abcy","email":"abcy@microsoft.com"},"repository":{"url":"git+https://github.com/Microsoft/MigrateToGraph.git","type":"git"},"_npmVersion":"6.11.3","description":"A tool to migrate existing database to a graph database","directories":{},"_nodeVersion":"10.13.0","dependencies":{"pg":"^7.6.0","ajv":"^6.5.4","ejs":"^2.6.1","knex":"^0.16.3","uuid":"^3.3.2","async":"^2.6.1","mssql":"^5.0.3","mysql2":"^1.6.1","gremlin":"^3.4.0","sqlite3":"^4.0.3","fs-extra":"^7.0.0","jsonlint":"^1.6.3","through2":"^3.0.1","commander":"^2.19.0","pg-hstore":"^2.3.2","sequelize":"^4.44.3","JSONStream":"^1.3.5","handlebars":"^4.4.3","convert-hrtime":"^2.0.0","json-source-map":"^0.4.0","single-line-log":"^1.1.2","flush-write-stream":"^2.0.0","parallel-transform":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.1.0","rimraf":"^2.0.0","tslint":"^5.0.0","ts-jest":"^24.0.0","ts-node":"^7.0.1","prettier":"^1.14.3","coveralls":"^3.0.2","@types/ejs":"^2.6.3","typescript":"^3.1.3","@types/jest":"^23.3.7","@types/node":"^11.11.6","@types/uuid":"^3.4.3","@types/async":"^2.0.50","@types/mssql":"^4.0.8","@types/fs-extra":"^5.0.4","@types/through2":"^2.0.34","@types/sequelize":"^4.27.29","@types/convert-hrtime":"^2.0.0","@types/single-line-log":"^1.1.0","tslint-config-prettier":"^1.1.0","typescript-json-schema":"^0.34.0","@types/flush-write-stream":"^1.0.0","@types/parallel-transform":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/migrate-to-graph_0.2.0_1571591920123_0.031463241248877116","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-01-28T19:56:52.008Z","modified":"2026-07-16T15:49:14.224Z","0.0.1":"2019-01-28T19:56:52.090Z","0.0.2":"2019-01-29T08:57:25.442Z","0.2.0":"2019-10-20T17:18:40.226Z"},"bugs":{"url":"https://github.com/Microsoft/MigrateToGraph/issues"},"author":{"name":"Microsoft Corporation"},"license":"MIT","homepage":"https://github.com/Microsoft/MigrateToGraph#readme","keywords":["graph","gremlin","database","migrate","graph-database","migration-tool","cosmosdb"],"repository":{"url":"git+https://github.com/Microsoft/MigrateToGraph.git","type":"git"},"description":"A tool to migrate existing database to a graph database","maintainers":[{"email":"npmjs@microsoft.com","name":"microsoft1es"},{"email":"microsoft-oss-publishing@microsoft.com","name":"microsoft-oss-releases"},{"email":"abcy@microsoft.com","name":"abcy"}],"readme":"# Migrate To Graph\r\nThis tool allows you to migrate existing database to a graph database\r\n\r\nConversions supported:\r\n- json to gremlin \r\n- json to graph\r\n- sql to graph\r\n\r\n## Installation (CLI)\r\n> npm i -g migrate-to-graph\r\n\r\n## Usage (CLI)\r\n    Usage: migrate-to-graph [options] [command]\r\n\r\n    Options:\r\n\r\n      -V, --version                           output the version number\r\n      -h, --help                              output usage information\r\n\r\n    Commands:\r\n\r\n      jsontogremlin <inputFile> <templateFile> <outputFile>\r\n      jsontograph <inputFile> <templateFile> <graphConfigFile>\r\n      sqltograph <sqlConfigFile> <query> <templateFile> <graphConfigFile>\r\n\r\n## Installation (Lib)\r\n> npm i --save migrate-to-graph\r\n\r\n## Usage (Lib)\r\n```js\r\n  var graphtool = require('migrate-to-graph');\r\n  var result = graphtool.jsonToGraph(json,template);\r\n\r\n   //or ES6\r\n  import {jsonToGraph} from 'migrate-to-graph';\r\n```\r\n\r\n### SQL Config File\r\n```json5\r\n{\r\n  \"dialect\":\"mssql\",  //dialect to use, 'mysql'|'sqlite'|'postgres'|'mssql'\r\n  \"username\": \"test\",\r\n  \"password\": \"password\",\r\n  \"host\": \"server\",\r\n  \"database\": \"database\",\r\n    \"options\": {\r\n        \"encrypt\": true   //set to true if you need encryption\r\n    }\r\n}\r\n```\r\n\r\n### Graph Config File\r\n```json5\r\n{\r\n  \"host\":\"server\",\r\n  \"password\":\"password\",\r\n  \"user\": \"username\",\r\n  \"port\": \"443\",\r\n  \"ssl\": true,\r\n  \"batchSize\": 10,  //No. of gremlin queries to execute in parallel (Default: 10)\r\n  \"upsert\": false //Set to true if you want to upsert vertices or edges (Default: false)\r\n\r\n}\r\n```\r\n\r\n<b>Note: </b>For Azure cosmos graph DB , user is '/dbs/{dbName}/colls/{collectionName}' and password is its secretKey\r\n\r\n## Template\r\nTo transform data to a graph, you need to transform the data into vertex and edge format. \r\n\r\nUsing a template you can convert a single data object into one/many vertexes and edges\r\n\r\nWe use handlebars to convert input to vertex / edge format\r\n\r\n### Example\r\n\r\ntemplate:\r\n\r\n```hbs\r\n{\r\n  \"vertices\":[\r\n    {\r\n      \"id\": \"{{myId}}\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"{{myName}}\"\r\n      }\r\n    },\r\n    {\r\n      \"id\": \"{{myFriendId}}\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"{{myFriendName}}\"\r\n      }\r\n    }\r\n  ],\r\n  \"edges\":[\r\n    {\r\n      \"label\": \"friend\",\r\n      \"from\": \"{{myId}}\",\r\n      \"to\": \"{{myFriendId}}\",\r\n      \"properties\": {\r\n        \"value\" : {{friendshipLvl}}\r\n      }\r\n    }\r\n  ]\r\n}\r\n\r\n```\r\n\r\n<b>Note: </b> You can specify as many vertices and edges as you want as long as it transforms to Vertex-Edge format\r\n\r\nInput Data(a single entity from array of data):\r\n\r\n```json\r\n  {\r\n    \"myId\": \"1\",\r\n    \"myName\": \"abc\",\r\n    \"myFriendId\": \"2\",\r\n    \"myFriendName\": \"xyz\",\r\n    \"friendshipLvl\": 3\r\n  }\r\n```\r\n\r\nTransformed Data:\r\n\r\n```json\r\n{\r\n  \"vertices\":[\r\n    {\r\n      \"id\": \"1\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"abc\"\r\n      }\r\n    },\r\n    {\r\n      \"id\": \"2\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"xyz\"\r\n      }\r\n    }\r\n  ],\r\n  \"edges\":[\r\n    {\r\n      \"label\": \"friend\",\r\n      \"from\": \"1\",\r\n      \"to\": \"2\",\r\n      \"properties\": {\r\n        \"value\" : 3\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n## Vertex-Edge Format\r\nThis is a custom format inspired from the way Azure Cosmos Graph DB stores data. We use this format to convert it to gremlin queries so you need to provide a template which transforms to vertex-edge format\r\n\r\nModel for Vertex and Edge\r\n```ts\r\nexport interface Vertex {\r\n  id: string;  \r\n  label: string;   //label for the vertex\r\n  type: 'vertex';\r\n  properties: {\r\n    [key: string]: any;  //Represents all the properties you wish to add to the vertex\r\n  };\r\n}\r\n\r\nexport interface Edge {\r\n  id?: string;\r\n  label: string;  //label for the edge\r\n  type: 'edge';\r\n  to: string;   //id of vertex from which you want the edge to start\r\n  from: string; //id of vertex to which you want the edge to end\r\n  properties?: {\r\n    [key: string]: any; //Represents all the properties you wish to add to the edge\r\n  };\r\n}\r\n\r\n```\r\n\r\nVertex-Edge Format expects you specify an array of vertices and edges\r\n\r\n```json\r\n{\r\n  \"vertices\":[\r\n    {\r\n      \"id\": \"1\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"abc\"\r\n      }\r\n    },\r\n    {\r\n      \"id\": \"2\",\r\n      \"label\": \"vertexLabel\",\r\n      \"properties\":{\r\n        \"name\": \"xyz\"\r\n      }\r\n    }\r\n  ],\r\n  \"edges\":[\r\n    {\r\n      \"label\": \"friend\",\r\n      \"from\": \"1\",\r\n      \"to\": \"2\",\r\n      \"properties\": {\r\n        \"value\" : 3\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n","readmeFilename":"README.md"}