@8base/utils
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -28,3 +28,2 @@ "use strict"; | ||
const graphql_prettier_1 = __importDefault(require("graphql-prettier")); | ||
const tableSelectors = __importStar(require("../selectors/tableSelectors")); | ||
const errors_1 = require("../errors"); | ||
@@ -85,5 +84,5 @@ const createQueryString_1 = require("./createQueryString"); | ||
const appName = selectors_1.tablesListSelectors.getTableApplicationName(tablesList, tableId); | ||
const hasNonMetaFields = tableSelectors.hasNonMetaFields(table); | ||
const hasCreatableFields = R.pipe(R.propOr([], 'fields'), R.any(R.pathEq(['dataFeatures', 'create'], true)))(table); | ||
const { withResultData = true } = config, restConfig = __rest(config, ["withResultData"]); | ||
if (hasNonMetaFields) { | ||
if (hasCreatableFields) { | ||
return graphql_prettier_1.default(` | ||
@@ -110,4 +109,4 @@ mutation ${upperFirst(table.name)}Create($data: ${schema_name_generator_1.SchemaNameGenerator.getCreateInputName(table.name, appName)}!) { | ||
const appName = selectors_1.tablesListSelectors.getTableApplicationName(tablesList, tableId); | ||
const hasNonMetaFields = tableSelectors.hasNonMetaFields(table); | ||
if (hasNonMetaFields) { | ||
const hasCreatableFields = R.pipe(R.propOr([], 'fields'), R.any(R.pathEq(['dataFeatures', 'create'], true)))(table); | ||
if (hasCreatableFields) { | ||
return graphql_prettier_1.default(` | ||
@@ -114,0 +113,0 @@ mutation ${upperFirst(table.name)}CreateMany($data: [${schema_name_generator_1.SchemaNameGenerator.getCreateManyInputName(table.name, appName)}]!) { |
{ | ||
"name": "@8base/utils", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"repository": "https://github.com/8base/sdk", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/8base/sdk/tree/master/packages/utils#readme", |
@@ -86,6 +86,11 @@ import * as R from 'ramda'; | ||
const appName = tablesListSelectors.getTableApplicationName(tablesList, tableId); | ||
const hasNonMetaFields = tableSelectors.hasNonMetaFields(table); | ||
const hasCreatableFields = R.pipe( | ||
R.propOr([], 'fields'), | ||
R.any(R.pathEq(['dataFeatures', 'create'], true)), | ||
)(table); | ||
const { withResultData = true, ...restConfig } = config; | ||
if (hasNonMetaFields) { | ||
if (hasCreatableFields) { | ||
return gqlPrettier(` | ||
@@ -114,5 +119,9 @@ mutation ${upperFirst(table.name)}Create($data: ${SchemaNameGenerator.getCreateInputName(table.name, appName)}!) { | ||
const appName = tablesListSelectors.getTableApplicationName(tablesList, tableId); | ||
const hasNonMetaFields = tableSelectors.hasNonMetaFields(table); | ||
if (hasNonMetaFields) { | ||
const hasCreatableFields = R.pipe( | ||
R.propOr([], 'fields'), | ||
R.any(R.pathEq(['dataFeatures', 'create'], true)), | ||
)(table); | ||
if (hasCreatableFields) { | ||
return gqlPrettier(` | ||
@@ -119,0 +128,0 @@ mutation ${upperFirst(table.name)}CreateMany($data: [${SchemaNameGenerator.getCreateManyInputName( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
290719
4750