mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-21 15:38:40 +03:00
This commit is contained in:
parent
9af591e2cb
commit
51abce2c1c
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "firebase2graphql",
|
||||
"description": "A CLI tool to get GraphQL over Firebase data dump",
|
||||
"version": "0.0.1-alpha7",
|
||||
"version": "0.0.1-alpha8",
|
||||
"author": "Hasura",
|
||||
"bin": {
|
||||
"firebase2graphql": "./bin/run",
|
||||
|
@ -25,7 +25,7 @@ const handleTableCandidate = (obj, tableName, tableDetectedCallback, isRootLevel
|
||||
for (var listKey in object) {
|
||||
const dummyRow = {...row};
|
||||
dummyRow[getPrimaryKeyName(dummyRow, null, 'self')] = uuid();
|
||||
dummyRow.__value = listKey;
|
||||
dummyRow._value = listKey;
|
||||
if (Object.keys(dummyRow).length > 0) {
|
||||
rowArray.push(dummyRow);
|
||||
}
|
||||
@ -44,7 +44,7 @@ const handleTableCandidate = (obj, tableName, tableDetectedCallback, isRootLevel
|
||||
tableName: parent || tableName,
|
||||
name: objectKey,
|
||||
pkeys: pkeyMap,
|
||||
data: Object.keys(value).map(item => ({__value: item})),
|
||||
data: Object.keys(value).map(item => ({_value: item})),
|
||||
}
|
||||
);
|
||||
} else if (isObjectList(value)) {
|
||||
@ -77,7 +77,7 @@ const handleTableCandidate = (obj, tableName, tableDetectedCallback, isRootLevel
|
||||
if (isList(obj)) {
|
||||
for (var listKey in obj) {
|
||||
rowArray.push({
|
||||
__value: listKey,
|
||||
_value: listKey,
|
||||
_id: uuid(),
|
||||
});
|
||||
}
|
||||
@ -86,8 +86,8 @@ const handleTableCandidate = (obj, tableName, tableDetectedCallback, isRootLevel
|
||||
if (isRandomList(obj)) {
|
||||
for (var objKey in obj) {
|
||||
rowArray.push({
|
||||
__key: objKey,
|
||||
__value: obj[objKey],
|
||||
_key: objKey,
|
||||
_value: obj[objKey],
|
||||
_id: uuid(),
|
||||
});
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ const throwError = require('../error');
|
||||
const {log, spinnerStart, spinnerStop} = require('../log');
|
||||
|
||||
const shouldIgnoreTable = table => {
|
||||
return (table.columns.find(c => c.name === '__value'));
|
||||
return (table.columns.find(c => c.name === '_value'));
|
||||
};
|
||||
|
||||
const getDupeCandidates = tables => {
|
||||
|
Loading…
Reference in New Issue
Block a user