@contember/engine-content-api 2.0.0-alpha.36 → 2.0.0-alpha.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +31 -6
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +31 -6
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
- package/dist/development/src/input-validation/ColumnValueResolver.cjs.map +1 -1
- package/dist/development/src/input-validation/ColumnValueResolver.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/CreateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/CreateInputPreValidationProcessor.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/InputPreValidator.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/InputPreValidator.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/UpdateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/UpdateInputPreValidationProcessor.js.map +1 -1
- package/dist/development/src/inputProcessing/CreateInputVisitor.cjs +6 -7
- package/dist/development/src/inputProcessing/CreateInputVisitor.cjs.map +1 -1
- package/dist/development/src/inputProcessing/CreateInputVisitor.js +6 -7
- package/dist/development/src/inputProcessing/CreateInputVisitor.js.map +1 -1
- package/dist/development/src/inputProcessing/UpdateInputVisitor.cjs +14 -15
- package/dist/development/src/inputProcessing/UpdateInputVisitor.cjs.map +1 -1
- package/dist/development/src/inputProcessing/UpdateInputVisitor.js +14 -15
- package/dist/development/src/inputProcessing/UpdateInputVisitor.js.map +1 -1
- package/dist/development/src/mapper/ColumnValue.cjs +8 -18
- package/dist/development/src/mapper/ColumnValue.cjs.map +1 -1
- package/dist/development/src/mapper/ColumnValue.js +8 -18
- package/dist/development/src/mapper/ColumnValue.js.map +1 -1
- package/dist/development/src/mapper/EventManager.cjs +1 -1
- package/dist/development/src/mapper/EventManager.cjs.map +1 -1
- package/dist/development/src/mapper/EventManager.js +1 -1
- package/dist/development/src/mapper/EventManager.js.map +1 -1
- package/dist/development/src/mapper/Mapper.cjs +8 -28
- package/dist/development/src/mapper/Mapper.cjs.map +1 -1
- package/dist/development/src/mapper/Mapper.js +8 -28
- package/dist/development/src/mapper/Mapper.js.map +1 -1
- package/dist/development/src/mapper/Result.cjs.map +1 -1
- package/dist/development/src/mapper/Result.js.map +1 -1
- package/dist/development/src/mapper/delete/DeleteExecutor.cjs +4 -8
- package/dist/development/src/mapper/delete/DeleteExecutor.cjs.map +1 -1
- package/dist/development/src/mapper/delete/DeleteExecutor.js +5 -9
- package/dist/development/src/mapper/delete/DeleteExecutor.js.map +1 -1
- package/dist/development/src/mapper/insert/InsertBuilder.cjs +12 -8
- package/dist/development/src/mapper/insert/InsertBuilder.cjs.map +1 -1
- package/dist/development/src/mapper/insert/InsertBuilder.js +13 -9
- package/dist/development/src/mapper/insert/InsertBuilder.js.map +1 -1
- package/dist/development/src/mapper/insert/Inserter.cjs.map +1 -1
- package/dist/development/src/mapper/insert/Inserter.js.map +1 -1
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.cjs +1 -3
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.js +1 -3
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs +4 -3
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js +4 -3
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs +4 -6
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js +5 -7
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/SqlUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/SqlUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/UpdateBuilder.cjs +12 -5
- package/dist/development/src/mapper/update/UpdateBuilder.cjs.map +1 -1
- package/dist/development/src/mapper/update/UpdateBuilder.js +13 -6
- package/dist/development/src/mapper/update/UpdateBuilder.js.map +1 -1
- package/dist/development/src/mapper/update/Updater.cjs.map +1 -1
- package/dist/development/src/mapper/update/Updater.js.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs +11 -16
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js +12 -17
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs +6 -7
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js +7 -8
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs +5 -4
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js +5 -4
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs +11 -12
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js +12 -13
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs +8 -12
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js +9 -13
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +31 -6
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +31 -6
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
- package/dist/production/src/input-validation/ColumnValueResolver.cjs.map +1 -1
- package/dist/production/src/input-validation/ColumnValueResolver.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/CreateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/CreateInputPreValidationProcessor.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/InputPreValidator.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/InputPreValidator.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/UpdateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/UpdateInputPreValidationProcessor.js.map +1 -1
- package/dist/production/src/inputProcessing/CreateInputVisitor.cjs +6 -7
- package/dist/production/src/inputProcessing/CreateInputVisitor.cjs.map +1 -1
- package/dist/production/src/inputProcessing/CreateInputVisitor.js +6 -7
- package/dist/production/src/inputProcessing/CreateInputVisitor.js.map +1 -1
- package/dist/production/src/inputProcessing/UpdateInputVisitor.cjs +14 -15
- package/dist/production/src/inputProcessing/UpdateInputVisitor.cjs.map +1 -1
- package/dist/production/src/inputProcessing/UpdateInputVisitor.js +14 -15
- package/dist/production/src/inputProcessing/UpdateInputVisitor.js.map +1 -1
- package/dist/production/src/mapper/ColumnValue.cjs +8 -18
- package/dist/production/src/mapper/ColumnValue.cjs.map +1 -1
- package/dist/production/src/mapper/ColumnValue.js +8 -18
- package/dist/production/src/mapper/ColumnValue.js.map +1 -1
- package/dist/production/src/mapper/EventManager.cjs +1 -1
- package/dist/production/src/mapper/EventManager.cjs.map +1 -1
- package/dist/production/src/mapper/EventManager.js +1 -1
- package/dist/production/src/mapper/EventManager.js.map +1 -1
- package/dist/production/src/mapper/Mapper.cjs +8 -28
- package/dist/production/src/mapper/Mapper.cjs.map +1 -1
- package/dist/production/src/mapper/Mapper.js +8 -28
- package/dist/production/src/mapper/Mapper.js.map +1 -1
- package/dist/production/src/mapper/Result.cjs.map +1 -1
- package/dist/production/src/mapper/Result.js.map +1 -1
- package/dist/production/src/mapper/delete/DeleteExecutor.cjs +4 -8
- package/dist/production/src/mapper/delete/DeleteExecutor.cjs.map +1 -1
- package/dist/production/src/mapper/delete/DeleteExecutor.js +5 -9
- package/dist/production/src/mapper/delete/DeleteExecutor.js.map +1 -1
- package/dist/production/src/mapper/insert/InsertBuilder.cjs +12 -8
- package/dist/production/src/mapper/insert/InsertBuilder.cjs.map +1 -1
- package/dist/production/src/mapper/insert/InsertBuilder.js +13 -9
- package/dist/production/src/mapper/insert/InsertBuilder.js.map +1 -1
- package/dist/production/src/mapper/insert/Inserter.cjs.map +1 -1
- package/dist/production/src/mapper/insert/Inserter.js.map +1 -1
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.cjs +1 -3
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.js +1 -3
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs +4 -3
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js +4 -3
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs +4 -6
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js +5 -7
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/SqlUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/SqlUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/UpdateBuilder.cjs +12 -5
- package/dist/production/src/mapper/update/UpdateBuilder.cjs.map +1 -1
- package/dist/production/src/mapper/update/UpdateBuilder.js +13 -6
- package/dist/production/src/mapper/update/UpdateBuilder.js.map +1 -1
- package/dist/production/src/mapper/update/Updater.cjs.map +1 -1
- package/dist/production/src/mapper/update/Updater.js.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs +11 -16
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js +12 -17
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs +6 -7
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js +7 -8
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs +5 -4
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js +5 -4
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs +11 -12
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js +12 -13
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs +8 -12
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js +9 -13
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js.map +1 -1
- package/dist/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.d.ts +2 -0
- package/dist/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.d.ts.map +1 -1
- package/dist/types/input-validation/ColumnValueResolver.d.ts +1 -1
- package/dist/types/input-validation/ColumnValueResolver.d.ts.map +1 -1
- package/dist/types/input-validation/ValidationDataSelector.d.ts +1 -1
- package/dist/types/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts +3 -3
- package/dist/types/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts.map +1 -1
- package/dist/types/input-validation/preValidation/InputPreValidator.d.ts +3 -3
- package/dist/types/input-validation/preValidation/InputPreValidator.d.ts.map +1 -1
- package/dist/types/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts +4 -4
- package/dist/types/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/CreateInputProcessor.d.ts +8 -6
- package/dist/types/inputProcessing/CreateInputProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/CreateInputVisitor.d.ts +3 -2
- package/dist/types/inputProcessing/CreateInputVisitor.d.ts.map +1 -1
- package/dist/types/inputProcessing/UpdateInputProcessor.d.ts +14 -12
- package/dist/types/inputProcessing/UpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/UpdateInputVisitor.d.ts +3 -2
- package/dist/types/inputProcessing/UpdateInputVisitor.d.ts.map +1 -1
- package/dist/types/mapper/ColumnValue.d.ts +4 -8
- package/dist/types/mapper/ColumnValue.d.ts.map +1 -1
- package/dist/types/mapper/EventManager.d.ts +9 -9
- package/dist/types/mapper/EventManager.d.ts.map +1 -1
- package/dist/types/mapper/Mapper.d.ts +6 -7
- package/dist/types/mapper/Mapper.d.ts.map +1 -1
- package/dist/types/mapper/Result.d.ts +5 -4
- package/dist/types/mapper/Result.d.ts.map +1 -1
- package/dist/types/mapper/delete/DeleteExecutor.d.ts.map +1 -1
- package/dist/types/mapper/insert/InsertBuilder.d.ts +3 -4
- package/dist/types/mapper/insert/InsertBuilder.d.ts.map +1 -1
- package/dist/types/mapper/insert/Inserter.d.ts +3 -2
- package/dist/types/mapper/insert/Inserter.d.ts.map +1 -1
- package/dist/types/mapper/insert/SqlCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/ManyHasManyCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/ManyHasManyCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/ManyHasOneCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/ManyHasOneCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasManyCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasManyCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/types.d.ts +84 -1
- package/dist/types/mapper/types.d.ts.map +1 -1
- package/dist/types/mapper/update/SqlUpdateInputProcessor.d.ts +2 -1
- package/dist/types/mapper/update/SqlUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/UpdateBuilder.d.ts +3 -3
- package/dist/types/mapper/update/UpdateBuilder.d.ts.map +1 -1
- package/dist/types/mapper/update/Updater.d.ts +2 -1
- package/dist/types/mapper/update/Updater.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/ManyHasManyUpdateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/update/relations/ManyHasManyUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/ManyHasOneUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/ManyHasOneUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasManyUpdateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/update/relations/OneHasManyUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.ts +35 -2
- package/src/input-validation/ColumnValueResolver.ts +1 -1
- package/src/input-validation/preValidation/CreateInputPreValidationProcessor.ts +2 -2
- package/src/input-validation/preValidation/InputPreValidator.ts +7 -7
- package/src/input-validation/preValidation/UpdateInputPreValidationProcessor.ts +3 -3
- package/src/inputProcessing/CreateInputProcessor.ts +8 -6
- package/src/inputProcessing/CreateInputVisitor.ts +18 -19
- package/src/inputProcessing/UpdateInputProcessor.ts +13 -11
- package/src/inputProcessing/UpdateInputVisitor.ts +25 -24
- package/src/mapper/ColumnValue.ts +11 -25
- package/src/mapper/EventManager.ts +6 -6
- package/src/mapper/Mapper.ts +19 -37
- package/src/mapper/Result.ts +3 -2
- package/src/mapper/delete/DeleteExecutor.ts +4 -8
- package/src/mapper/insert/InsertBuilder.ts +20 -17
- package/src/mapper/insert/Inserter.ts +4 -3
- package/src/mapper/insert/SqlCreateInputProcessor.ts +1 -3
- package/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.ts +8 -8
- package/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.ts +8 -8
- package/src/mapper/insert/relations/OneHasManyCreateInputProcessor.ts +8 -6
- package/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.ts +8 -9
- package/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.ts +9 -9
- package/src/mapper/types.ts +115 -1
- package/src/mapper/update/SqlUpdateInputProcessor.ts +2 -1
- package/src/mapper/update/UpdateBuilder.ts +20 -12
- package/src/mapper/update/Updater.ts +3 -2
- package/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.ts +15 -19
- package/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.ts +11 -11
- package/src/mapper/update/relations/OneHasManyUpdateInputProcessor.ts +9 -7
- package/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.ts +18 -18
- package/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.ts +14 -17
- package/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.ts +37 -0
- package/tests/cases/integration/graphQlRequests/query/misc/reducedHasMany.test.ts +69 -0
- package/tests/cases/integration/graphQlRequests/update/manyHasOne/update.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/manyHasOne/upsert.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/oneHasOneInverse/upsert.test.ts +9 -0
- package/tests/cases/integration/graphQlRequests/update/oneHasOneOwning/update.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/oneHasOneOwning/upsert.test.ts +0 -5
- package/tests/cases/integration/graphQlSchema/schema-acl-allowed.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-create.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-delete.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-update.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-basic.gql +11 -0
- package/tests/cases/integration/graphQlSchema/schema-bug-66.gql +6 -0
- package/tests/cases/integration/graphQlSchema/schema-custom-primary.gql +11 -0
- package/tests/cases/integration/graphQlSchema/schema-has-many-reduction.gql +6 -0
- package/tests/cases/integration/graphQlSchema/schema-new-builder.gql +12 -0
- package/tests/cases/unit/inputPreValidator.test.ts +1 -1
- package/tests/src/testGraphql.ts +1 -1
|
@@ -14,6 +14,7 @@ import { Mapper } from '../../Mapper'
|
|
|
14
14
|
import { UpdateBuilder } from '../../update/UpdateBuilder'
|
|
15
15
|
import { CheckedPrimary } from '../../CheckedPrimary'
|
|
16
16
|
import { SqlUpdateInputProcessorResult } from '../SqlUpdateInputProcessor'
|
|
17
|
+
import { MapperInput } from '../../types'
|
|
17
18
|
|
|
18
19
|
type Context = Model.OneHasOneOwningContext
|
|
19
20
|
|
|
@@ -25,12 +26,10 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
25
26
|
) {
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
public async connect(context: Model.OneHasOneOwningContext & { input: Input.UniqueWhere }) {
|
|
29
|
+
public async connect(context: Model.OneHasOneOwningContext & { input: Input.UniqueWhere | CheckedPrimary }) {
|
|
29
30
|
const { entity, relation, targetEntity, targetRelation, input } = context
|
|
30
|
-
const newInverseSide = await this.mapper.getPrimaryValue(targetEntity, input)
|
|
31
|
-
if (
|
|
32
|
-
return [new MutationEntryNotFoundError([], input)]
|
|
33
|
-
}
|
|
31
|
+
const [newInverseSide, err] = await this.mapper.getPrimaryValue(targetEntity, input)
|
|
32
|
+
if (err) return [err]
|
|
34
33
|
const currentInverseSide = await this.getCurrentInverseSide(targetRelation, relation, entity)
|
|
35
34
|
const currentOwnerResult = await this.handleStateBeforeConnect(context, currentInverseSide, newInverseSide)
|
|
36
35
|
if (currentOwnerResult.some(it => it.error)
|
|
@@ -49,7 +48,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
public async create(context: Model.OneHasOneOwningContext & { input:
|
|
51
|
+
public async create(context: Model.OneHasOneOwningContext & { input: MapperInput.CreateDataInput }) {
|
|
53
52
|
const { entity, relation, targetEntity, targetRelation } = context
|
|
54
53
|
const currentInverseSide = await this.getCurrentInverseSide(targetRelation, relation, entity)
|
|
55
54
|
const createResult = await this.createInternal(context, currentInverseSide)
|
|
@@ -67,10 +66,10 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
public async connectOrCreate({ input: { connect, create }, ...context }: Model.OneHasOneOwningContext & { input:
|
|
69
|
+
public async connectOrCreate({ input: { connect, create }, ...context }: Model.OneHasOneOwningContext & { input: MapperInput.ConnectOrCreateInput }) {
|
|
71
70
|
const { relation, targetRelation, targetEntity, entity } = context
|
|
72
71
|
const currentInverseSide = await this.getCurrentInverseSide(targetRelation, relation, entity)
|
|
73
|
-
const newInverseSide = await this.mapper.getPrimaryValue(targetEntity, connect)
|
|
72
|
+
const [newInverseSide] = await this.mapper.getPrimaryValue(targetEntity, connect)
|
|
74
73
|
|
|
75
74
|
if (newInverseSide) {
|
|
76
75
|
const currentOwnerResult = await this.handleStateBeforeConnect(context, currentInverseSide, newInverseSide)
|
|
@@ -103,7 +102,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
public async update({ entity, relation, targetEntity, input }: Model.OneHasOneOwningContext & { input:
|
|
105
|
+
public async update({ entity, relation, targetEntity, input }: Model.OneHasOneOwningContext & { input: MapperInput.UpdateDataInput }) {
|
|
107
106
|
return async () => {
|
|
108
107
|
const inversePrimary = await this.mapper.selectField(
|
|
109
108
|
entity,
|
|
@@ -113,7 +112,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
113
112
|
if (!inversePrimary) {
|
|
114
113
|
return [new MutationNothingToDo([], NothingToDoReason.emptyRelation)]
|
|
115
114
|
}
|
|
116
|
-
return await this.mapper.update(targetEntity,
|
|
115
|
+
return await this.mapper.update(targetEntity, new CheckedPrimary(inversePrimary), input)
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
|
|
@@ -130,7 +129,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
return async () => {
|
|
133
|
-
return await this.mapper.update(targetEntity,
|
|
132
|
+
return await this.mapper.update(targetEntity, new CheckedPrimary(primary), update)
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
|
|
@@ -149,7 +148,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
149
148
|
|
|
150
149
|
if (relation.orphanRemoval && inversePrimary) {
|
|
151
150
|
return async () => {
|
|
152
|
-
return await this.mapper.delete(targetEntity,
|
|
151
|
+
return await this.mapper.delete(targetEntity, new CheckedPrimary(inversePrimary))
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
|
|
@@ -175,7 +174,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
175
174
|
}
|
|
176
175
|
|
|
177
176
|
private async createInternal(
|
|
178
|
-
{ targetEntity, targetRelation, relation, input }: Model.OneHasOneOwningContext & { input:
|
|
177
|
+
{ targetEntity, targetRelation, relation, input }: Model.OneHasOneOwningContext & { input: MapperInput.CreateDataInput },
|
|
179
178
|
currentInverseSide: Input.PrimaryValue | undefined,
|
|
180
179
|
): Promise<MutationResultList> {
|
|
181
180
|
if (targetRelation && !targetRelation.nullable && !relation.orphanRemoval && currentInverseSide) {
|
|
@@ -209,7 +208,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
209
208
|
return [new MutationNothingToDo([], NothingToDoReason.alreadyExists)]
|
|
210
209
|
}
|
|
211
210
|
|
|
212
|
-
const currentOwnerOfNewInverseSide = await this.mapper.getPrimaryValue(entity, {
|
|
211
|
+
const [currentOwnerOfNewInverseSide] = await this.mapper.getPrimaryValue(entity, {
|
|
213
212
|
[relation.name]: { [targetEntity.primary]: newInverseSide },
|
|
214
213
|
})
|
|
215
214
|
|
|
@@ -229,9 +228,7 @@ export class OneHasOneOwningUpdateInputProcessor implements UpdateInputProcessor
|
|
|
229
228
|
|
|
230
229
|
return await this.mapper.updateInternal(
|
|
231
230
|
entity,
|
|
232
|
-
|
|
233
|
-
[entity.primary]: currentOwnerOfNewInverseSide,
|
|
234
|
-
},
|
|
231
|
+
new CheckedPrimary(currentOwnerOfNewInverseSide),
|
|
235
232
|
builder => {
|
|
236
233
|
builder.addPredicates([relation.name])
|
|
237
234
|
builder.addFieldValue(relation.name, null)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { test } from 'bun:test'
|
|
2
|
+
import { execute, sqlTransaction } from '../../../../src/test'
|
|
3
|
+
import { SchemaBuilder } from '@contember/schema-definition'
|
|
4
|
+
import { Model } from '@contember/schema'
|
|
5
|
+
import { GQL, SQL } from '../../../../src/tags'
|
|
6
|
+
import { testUuid } from '../../../../src/testUuid'
|
|
7
|
+
|
|
8
|
+
test('insert json object', async () => {
|
|
9
|
+
await execute({
|
|
10
|
+
schema: new SchemaBuilder()
|
|
11
|
+
.entity('Foo', entity => entity.column('data', c => c.type(Model.ColumnType.Json)))
|
|
12
|
+
.buildSchema(),
|
|
13
|
+
query: GQL`
|
|
14
|
+
mutation {
|
|
15
|
+
createFoo(data: {data: {foo: "value"}}) {
|
|
16
|
+
ok
|
|
17
|
+
}
|
|
18
|
+
}`,
|
|
19
|
+
executes: [
|
|
20
|
+
...sqlTransaction([
|
|
21
|
+
{
|
|
22
|
+
sql: SQL`with "root_" as (select ? :: uuid as "id", ? :: jsonb as "data") insert into "public"."foo" ("id", "data") select "root_"."id", "root_"."data" from "root_" returning "id"`,
|
|
23
|
+
parameters: [testUuid(1), '{"foo":"value"}'],
|
|
24
|
+
response: { rows: [{ id: testUuid(1) }] },
|
|
25
|
+
},
|
|
26
|
+
]),
|
|
27
|
+
],
|
|
28
|
+
return: {
|
|
29
|
+
data: {
|
|
30
|
+
createFoo: {
|
|
31
|
+
ok: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
|
|
@@ -73,3 +73,72 @@ test('reduced has many', async () => {
|
|
|
73
73
|
})
|
|
74
74
|
})
|
|
75
75
|
|
|
76
|
+
|
|
77
|
+
test('universal reduced has many', async () => {
|
|
78
|
+
await execute({
|
|
79
|
+
schema: new SchemaBuilder()
|
|
80
|
+
.entity('Post', e =>
|
|
81
|
+
e
|
|
82
|
+
.column('publishedAt', c => c.type(Model.ColumnType.DateTime))
|
|
83
|
+
.oneHasMany('locales', r =>
|
|
84
|
+
r.ownedBy('post').target('PostLocale', e =>
|
|
85
|
+
e
|
|
86
|
+
.unique(['locale', 'post'])
|
|
87
|
+
.column('locale', c => c.type(Model.ColumnType.String))
|
|
88
|
+
.column('title', c => c.type(Model.ColumnType.String)),
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
)
|
|
92
|
+
.buildSchema(),
|
|
93
|
+
query: GQL`
|
|
94
|
+
query {
|
|
95
|
+
listPost {
|
|
96
|
+
id
|
|
97
|
+
localesBy(by: {locale: "cs"}) {
|
|
98
|
+
id
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}`,
|
|
102
|
+
executes: [
|
|
103
|
+
{
|
|
104
|
+
sql: SQL`select
|
|
105
|
+
"root_"."id" as "root_id",
|
|
106
|
+
"root_"."id" as "root_id"
|
|
107
|
+
from "public"."post" as "root_"`,
|
|
108
|
+
parameters: [],
|
|
109
|
+
response: {
|
|
110
|
+
rows: [{ root_id: testUuid(1) }, { root_id: testUuid(2) }],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
sql: SQL`select
|
|
115
|
+
"root_"."post_id" as "root_post",
|
|
116
|
+
"root_"."id" as "root_id"
|
|
117
|
+
from "public"."post_locale" as "root_"
|
|
118
|
+
where "root_"."locale" = ? and "root_"."post_id" in (?, ?)`,
|
|
119
|
+
parameters: ['cs', testUuid(1), testUuid(2)],
|
|
120
|
+
response: {
|
|
121
|
+
rows: [
|
|
122
|
+
{ root_post: testUuid(1), root_id: testUuid(11) },
|
|
123
|
+
{ root_post: testUuid(2), root_id: testUuid(12) },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
return: {
|
|
129
|
+
data: {
|
|
130
|
+
listPost: [
|
|
131
|
+
{
|
|
132
|
+
id: testUuid(1),
|
|
133
|
+
localesBy: { id: testUuid(11) },
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: testUuid(2),
|
|
137
|
+
localesBy: { id: testUuid(12) },
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
|
|
@@ -31,11 +31,6 @@ test('update', async () => {
|
|
|
31
31
|
rows: [{ author_id: testUuid(1) }],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
sql: SQL`select "root_"."id" from "public"."author" as "root_" where "root_"."id" = ?`,
|
|
36
|
-
parameters: [testUuid(1)],
|
|
37
|
-
response: { rows: [{ id: testUuid(1) }] },
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
sql: SQL`with "newData_" as (select ? :: text as "name", "root_"."name" as "name_old__", "root_"."id" from "public"."author" as "root_" where "root_"."id" = ?)
|
|
41
36
|
update "public"."author" set "name" = "newData_"."name" from "newData_" where "author"."id" = "newData_"."id" returning "name_old__"`,
|
|
@@ -31,11 +31,6 @@ test('upsert - exists', async () => {
|
|
|
31
31
|
rows: [{ author_id: testUuid(1) }],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
sql: SQL`select "root_"."id" from "public"."author" as "root_" where "root_"."id" = ?`,
|
|
36
|
-
parameters: [testUuid(1)],
|
|
37
|
-
response: { rows: [{ id: testUuid(1) }] },
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
sql: SQL`with "newData_" as (select ? :: text as "name", "root_"."name" as "name_old__", "root_"."id" from "public"."author" as "root_" where "root_"."id" = ?)
|
|
41
36
|
update "public"."author" set "name" = "newData_"."name" from "newData_" where "author"."id" = "newData_"."id" returning "name_old__"`,
|
|
@@ -71,6 +71,15 @@ test('upsert - not exists', async () => {
|
|
|
71
71
|
{
|
|
72
72
|
sql: SQL`select "root_"."id"
|
|
73
73
|
from "public"."site" as "root_"
|
|
74
|
+
where "root_"."setting_id" = ?`,
|
|
75
|
+
parameters: [settingId],
|
|
76
|
+
response: {
|
|
77
|
+
rows: [],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
sql: SQL`select "root_"."id"
|
|
82
|
+
from "public"."site" as "root_"
|
|
74
83
|
where "root_"."setting_id" = ?`,
|
|
75
84
|
parameters: [settingId],
|
|
76
85
|
response: {
|
|
@@ -31,11 +31,6 @@ test('update', async () => {
|
|
|
31
31
|
rows: [{ setting_id: testUuid(1) }],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
sql: SQL`select "root_"."id" from "public"."site_setting" as "root_" where "root_"."id" = ?`,
|
|
36
|
-
parameters: [testUuid(1)],
|
|
37
|
-
response: { rows: [{ id: testUuid(1) }] },
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
sql: SQL`with "newData_" as (select ? :: text as "url", "root_"."url" as "url_old__", "root_"."id" from "public"."site_setting" as "root_" where "root_"."id" = ?)
|
|
41
36
|
update "public"."site_setting" set "url" = "newData_"."url" from "newData_" where "site_setting"."id" = "newData_"."id" returning "url_old__"`,
|
|
@@ -31,11 +31,6 @@ test('upsert - exists', async () => {
|
|
|
31
31
|
rows: [{ setting_id: testUuid(1) }],
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
sql: SQL`select "root_"."id" from "public"."site_setting" as "root_" where "root_"."id" = ?`,
|
|
36
|
-
parameters: [testUuid(1)],
|
|
37
|
-
response: { rows: [{ id: testUuid(1) }] },
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
sql: SQL`with "newData_" as (select ? :: text as "url", "root_"."url" as "url_old__", "root_"."id" from "public"."site_setting" as "root_" where "root_"."id" = ?)
|
|
41
36
|
update "public"."site_setting" set "url" = "newData_"."url" from "newData_" where "site_setting"."id" = "newData_"."id" returning "url_old__"`,
|
|
@@ -38,6 +38,7 @@ type Root {
|
|
|
38
38
|
id: UUID!
|
|
39
39
|
foo: String
|
|
40
40
|
r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
|
|
41
|
+
rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
|
|
41
42
|
paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -125,6 +126,10 @@ input RootOrderBy {
|
|
|
125
126
|
foo: OrderDirection
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
input RootRUniqueWhere {
|
|
130
|
+
id: UUID
|
|
131
|
+
}
|
|
132
|
+
|
|
128
133
|
type OneHasManyEntityConnection {
|
|
129
134
|
pageInfo: PageInfo!
|
|
130
135
|
edges: [OneHasManyEntityEdge!]!
|
|
@@ -35,6 +35,7 @@ type Root {
|
|
|
35
35
|
_meta: RootMeta
|
|
36
36
|
id: UUID!
|
|
37
37
|
r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
|
|
38
|
+
rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
|
|
38
39
|
paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -119,6 +120,10 @@ input RootOrderBy {
|
|
|
119
120
|
id: OrderDirection
|
|
120
121
|
}
|
|
121
122
|
|
|
123
|
+
input RootRUniqueWhere {
|
|
124
|
+
id: UUID
|
|
125
|
+
}
|
|
126
|
+
|
|
122
127
|
type OneHasManyEntityConnection {
|
|
123
128
|
pageInfo: PageInfo!
|
|
124
129
|
edges: [OneHasManyEntityEdge!]!
|
|
@@ -37,6 +37,7 @@ type Root {
|
|
|
37
37
|
_meta: RootMeta
|
|
38
38
|
id: UUID!
|
|
39
39
|
r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
|
|
40
|
+
rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
|
|
40
41
|
paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -121,6 +122,10 @@ input RootOrderBy {
|
|
|
121
122
|
id: OrderDirection
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
input RootRUniqueWhere {
|
|
126
|
+
id: UUID
|
|
127
|
+
}
|
|
128
|
+
|
|
124
129
|
type OneHasManyEntityConnection {
|
|
125
130
|
pageInfo: PageInfo!
|
|
126
131
|
edges: [OneHasManyEntityEdge!]!
|
|
@@ -36,6 +36,7 @@ type Root {
|
|
|
36
36
|
_meta: RootMeta
|
|
37
37
|
id: UUID!
|
|
38
38
|
r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
|
|
39
|
+
rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
|
|
39
40
|
paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -120,6 +121,10 @@ input RootOrderBy {
|
|
|
120
121
|
id: OrderDirection
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
input RootRUniqueWhere {
|
|
125
|
+
id: UUID
|
|
126
|
+
}
|
|
127
|
+
|
|
123
128
|
type OneHasManyEntityConnection {
|
|
124
129
|
pageInfo: PageInfo!
|
|
125
130
|
edges: [OneHasManyEntityEdge!]!
|
|
@@ -29,6 +29,7 @@ type Author {
|
|
|
29
29
|
name: String
|
|
30
30
|
posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
|
|
31
31
|
postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
|
|
32
|
+
postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
|
|
32
33
|
paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -52,6 +53,7 @@ type Post {
|
|
|
52
53
|
publishedAt: DateTime
|
|
53
54
|
locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
|
|
54
55
|
categories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], offset: Int, limit: Int): [Category!]!
|
|
56
|
+
localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
55
57
|
paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
|
|
56
58
|
paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
|
|
57
59
|
}
|
|
@@ -235,6 +237,10 @@ input CategoryOrderBy {
|
|
|
235
237
|
name: OrderDirection
|
|
236
238
|
}
|
|
237
239
|
|
|
240
|
+
input PostLocalesUniqueWhere {
|
|
241
|
+
id: UUID
|
|
242
|
+
}
|
|
243
|
+
|
|
238
244
|
type PostLocaleConnection {
|
|
239
245
|
pageInfo: PageInfo!
|
|
240
246
|
edges: [PostLocaleEdge!]!
|
|
@@ -261,6 +267,11 @@ input PostLocaleUniqueWhere {
|
|
|
261
267
|
id: UUID
|
|
262
268
|
}
|
|
263
269
|
|
|
270
|
+
input AuthorPostsUniqueWhere {
|
|
271
|
+
id: UUID
|
|
272
|
+
locales: PostLocaleUniqueWhere
|
|
273
|
+
}
|
|
274
|
+
|
|
264
275
|
input AuthorUniqueWhere {
|
|
265
276
|
id: UUID
|
|
266
277
|
posts: PostUniqueWhere
|
|
@@ -42,6 +42,7 @@ type FrontPage {
|
|
|
42
42
|
introVideo(filter: VideoWhere): Video
|
|
43
43
|
inHouseVideos(filter: VideoWhere, orderBy: [VideoOrderBy!], offset: Int, limit: Int): [Video!]!
|
|
44
44
|
inHouseVideosByFrontPageForIntro(by: FrontPageInHouseVideosByFrontPageForIntroUniqueWhere!, filter: VideoWhere): Video
|
|
45
|
+
inHouseVideosBy(by: FrontPageInHouseVideosUniqueWhere!, filter: VideoWhere): Video
|
|
45
46
|
paginateInHouseVideos(filter: VideoWhere, orderBy: [VideoOrderBy!], skip: Int, first: Int): VideoConnection!
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -170,6 +171,11 @@ input VideoUniqueWhere {
|
|
|
170
171
|
frontPageForIntro: FrontPageUniqueWhere
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
input FrontPageInHouseVideosUniqueWhere {
|
|
175
|
+
id: UUID
|
|
176
|
+
frontPageForIntro: FrontPageUniqueWhere
|
|
177
|
+
}
|
|
178
|
+
|
|
173
179
|
type VideoConnection {
|
|
174
180
|
pageInfo: PageInfo!
|
|
175
181
|
edges: [VideoEdge!]!
|
|
@@ -29,6 +29,7 @@ type Author {
|
|
|
29
29
|
name: String
|
|
30
30
|
posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
|
|
31
31
|
postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
|
|
32
|
+
postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
|
|
32
33
|
paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -52,6 +53,7 @@ type Post {
|
|
|
52
53
|
publishedAt: DateTime
|
|
53
54
|
locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
|
|
54
55
|
categories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], offset: Int, limit: Int): [Category!]!
|
|
56
|
+
localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
55
57
|
paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
|
|
56
58
|
paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
|
|
57
59
|
}
|
|
@@ -235,6 +237,10 @@ input CategoryOrderBy {
|
|
|
235
237
|
name: OrderDirection
|
|
236
238
|
}
|
|
237
239
|
|
|
240
|
+
input PostLocalesUniqueWhere {
|
|
241
|
+
id: UUID
|
|
242
|
+
}
|
|
243
|
+
|
|
238
244
|
type PostLocaleConnection {
|
|
239
245
|
pageInfo: PageInfo!
|
|
240
246
|
edges: [PostLocaleEdge!]!
|
|
@@ -261,6 +267,11 @@ input PostLocaleUniqueWhere {
|
|
|
261
267
|
id: UUID
|
|
262
268
|
}
|
|
263
269
|
|
|
270
|
+
input AuthorPostsUniqueWhere {
|
|
271
|
+
id: UUID
|
|
272
|
+
locales: PostLocaleUniqueWhere
|
|
273
|
+
}
|
|
274
|
+
|
|
264
275
|
input AuthorUniqueWhere {
|
|
265
276
|
id: UUID
|
|
266
277
|
posts: PostUniqueWhere
|
|
@@ -41,6 +41,7 @@ type Post {
|
|
|
41
41
|
publishedAt: DateTime
|
|
42
42
|
locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
|
|
43
43
|
localesByLocale(by: PostLocalesByLocaleUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
44
|
+
localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
44
45
|
paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -152,6 +153,11 @@ input PostLocalesByLocaleUniqueWhere {
|
|
|
152
153
|
locale: String
|
|
153
154
|
}
|
|
154
155
|
|
|
156
|
+
input PostLocalesUniqueWhere {
|
|
157
|
+
id: UUID
|
|
158
|
+
locale: String
|
|
159
|
+
}
|
|
160
|
+
|
|
155
161
|
type PostLocaleConnection {
|
|
156
162
|
pageInfo: PageInfo!
|
|
157
163
|
edges: [PostLocaleEdge!]!
|
|
@@ -29,6 +29,7 @@ type Author {
|
|
|
29
29
|
name: String
|
|
30
30
|
posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
|
|
31
31
|
postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
|
|
32
|
+
postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
|
|
32
33
|
paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -54,6 +55,7 @@ type Post {
|
|
|
54
55
|
author(filter: AuthorWhere): Author
|
|
55
56
|
locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
|
|
56
57
|
localesByLocale(by: PostLocalesByLocaleUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
58
|
+
localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
|
|
57
59
|
paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
|
|
58
60
|
paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
|
|
59
61
|
}
|
|
@@ -291,6 +293,11 @@ input PostLocalesByLocaleUniqueWhere {
|
|
|
291
293
|
locale: Locale
|
|
292
294
|
}
|
|
293
295
|
|
|
296
|
+
input PostLocalesUniqueWhere {
|
|
297
|
+
id: UUID
|
|
298
|
+
locale: Locale
|
|
299
|
+
}
|
|
300
|
+
|
|
294
301
|
type CategoryConnection {
|
|
295
302
|
pageInfo: PageInfo!
|
|
296
303
|
edges: [CategoryEdge!]!
|
|
@@ -324,6 +331,11 @@ input PostUniqueWhere {
|
|
|
324
331
|
locales: PostLocaleUniqueWhere
|
|
325
332
|
}
|
|
326
333
|
|
|
334
|
+
input AuthorPostsUniqueWhere {
|
|
335
|
+
id: UUID
|
|
336
|
+
locales: PostLocaleUniqueWhere
|
|
337
|
+
}
|
|
338
|
+
|
|
327
339
|
input AuthorUniqueWhere {
|
|
328
340
|
id: UUID
|
|
329
341
|
posts: PostUniqueWhere
|
|
@@ -33,7 +33,7 @@ const createDataSelectorMock = (primaryValues: PrimaryValueExpectation[], select
|
|
|
33
33
|
}
|
|
34
34
|
assert.deepStrictEqual(entity.name, entry.entity)
|
|
35
35
|
assert.deepStrictEqual(where, entry.where)
|
|
36
|
-
return entry.result
|
|
36
|
+
return [entry.result, undefined]
|
|
37
37
|
},
|
|
38
38
|
select: async (
|
|
39
39
|
mapper: Mapper,
|
package/tests/src/testGraphql.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const executeGraphQlTest = async (test: Test) => {
|
|
|
21
21
|
})
|
|
22
22
|
})
|
|
23
23
|
if ('errors' in rawResponse) {
|
|
24
|
-
if (rawResponse.errors?.length === 1 &&
|
|
24
|
+
if (rawResponse.errors?.length === 1 && (rawResponse.errors as any)[0].originalError) {
|
|
25
25
|
throw (rawResponse.errors as any)[0].originalError
|
|
26
26
|
}
|
|
27
27
|
rawResponse.errors = (rawResponse.errors as any).map(({ message }: any) => ({ message }))
|