twinlogix / typetta Goto Github PK
View Code? Open in Web Editor NEWNode.js ORM written in TypeScript for type lovers.
Home Page: https://twinlogix.github.io/typetta/
License: Apache License 2.0
Node.js ORM written in TypeScript for type lovers.
Home Page: https://twinlogix.github.io/typetta/
License: Apache License 2.0
Add validate
directives`:
type User @mongoEntity {
email: String! @validate(logic: "email")
}
The validation logic 'email' is implemented in the specific DAOContext.
Add some ready to use validation logics and it's specific directive. Example:
type User @mongoEntity {
email: String! @email
views: Int! @positive
}
We can take inspiration from Hibernate multi-tenancy support described here https://www.baeldung.com/hibernate-5-multitenancy
There should be the possibility to add a condition that returns a record only if some/every/none of its related entities satisfy another given condition.
Like RawFilter
and RawSort
it would be nice to support RawUpdate
.
Related to #15.
Sometimes a transaction function that wraps all the operations can be easy to use than passing a transaction reference to all the operations. Both options have pros and cons.
Following an example:
const trx = await knexInstance.transaction({ isolationLevel: 'snapshot' })
try {
await dao.transaction(trx, () => {
const user = await dao.user.findOne({
filter: { id: '1fc70958-b791-4855-bbb3-d7b02b22b39e' },
projection: { id: true, balance: true }
)
await dao.user.updateOne({
filter: { id: user.id },
changes: { balance: user.balance + 10 }
});
);
await trx.commit()
} catch(e) {
await trx.rollback()
}
Adding the ability to have a mocked DAOContext where no driver is specified and, by default, the only data source is sqlite in memory database (the user doesn't need to create and pass it to init).
This inmemory database is created if the user pass an explicit mock: true
parameter to the DAOContext.
type User @mongoEntity {
id: ID! @id
friendId: ID!
friend: User! @innerRef
}
We can take inspiration from https://typeorm.io/#/caching
A good idea could be to change the way a user can define a security policy, in a more declarative and expressive way (we can take something from GaphQL Shield?!).
Virtual fields sounds better.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@types/jest
, jest
, ts-jest
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)inquirer
, @types/inquirer
)object-hash
, @types/object-hash
)uuid
, @types/uuid
)@graphql-codegen/add
, @graphql-codegen/cli
, @graphql-codegen/plugin-helpers
, @graphql-codegen/schema-ast
, @graphql-codegen/typescript
, @graphql-codegen/typescript-resolvers
, @graphql-codegen/visitor-plugin-common
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
docs/Gemfile
github-pages ">= 228"
jekyll-feed "~> 0.6"
tzinfo "~> 1.2", ">= 1.2.10"
tzinfo-data undefined
wdm "~> 0.1.0"
kramdown-parser-gfm undefined
.github/workflows/build-and-test.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/codeql-analysis.yml
actions/checkout v3
github/codeql-action v1
github/codeql-action v1
github/codeql-action v1
docs/_layouts/default.html
html5shiv 3.7.3
package.json
@graphql-codegen/add 3.2.3
@graphql-codegen/cli 2.16.5
@graphql-codegen/plugin-helpers 3.1.2
@graphql-codegen/schema-ast 2.6.1
@graphql-codegen/typescript 2.8.8
@graphql-codegen/typescript-resolvers 2.7.13
@graphql-codegen/visitor-plugin-common 2.13.8
chalk 4.1.2
commander 9.5.0
dataloader 2.2.2
dedent 0.7.0
graphql 16.8.1
graphql-tag 2.12.6
inquirer 8.2.6
is-plain-object 5.0.0
lodash 4.17.21
object-hash 2.2.0
prettier 3.0.3
type-fest 2.19.0
yaml 2.3.3
uuid 8.3.2
@trivago/prettier-plugin-sort-imports 4.2.0
@types/dedent 0.7.0
@types/inquirer 8.2.6
@types/jest 27.5.2
@types/lodash 4.14.195
@types/node 18.18.5
@types/object-hash 2.2.1
@types/sha256 0.2.0
@types/uuid 8.3.4
@typescript-eslint/eslint-plugin 5.62.0
@typescript-eslint/parser 5.62.0
@apollo/server 4.9.3
bignumber.js 9.1.1
eslint 8.51.0
jest 27.5.1
make-coverage-badge 1.2.0
mongodb-memory-server 8.13.0
prettier 3.0.3
release-it 15.11.0
rimraf 3.0.2
sha256 0.2.0
ts-jest 27.1.5
typedoc 0.24.8
typescript 4.9.5
sqlite3 5.1.4
knex 2.5.1
mongodb 5.8.0
redis 4.6.7
node >=12.6
pnpm >=6.14.1
graphql 16.8.1
Introspection functionality to create or update an application model from a database. For SQL databases we can evaluate https://www.npmjs.com/package/knex-schema-inspector and for MongoDB https://github.com/mongodb-js/mongodb-schema
Now ModelProjection
utility type return alway an object with the concatenation of the projection (& { __projection: P }
). This is useful for a better type checking but it obfuscates the return type of find operations.
Proposal:
add disableProjectionReturn
settings in the codegen.yml (default as false) that disable this behaviour.
const server = new ApolloServer({
schema: application.createSchemaForApollo(),
context: () => {
return {
dao: mockedDAOContext()
}
}
});
this gives error and
const server = new ApolloServer({
schema: application.createSchemaForApollo(),
context: () => {
return {
dao: mockedDAOContext({})
}
}
});
and this it doesn't.
Design a monitoring and alerts management with the ability to:
Like $push, $unset, ecc...
While generating sqlEntity check for arrays. If any throw error.
TSLint is now deprecated.
In paranoid mode all deletions are logic, done by setting a deletedAt date field and every other API should automatically filter for records with deletedAt null.
Instead of { projection: projection<T>.fromInfo(info) }
let create the filter as { projection: info }
.
Currently not working on MongoDB and SQL
Including scalars in graphql-scalar, and Decimal
, and Coordinates
.
Proposal:
This could be necessary to add some other deliverables in the same project. We can also already separate typetta from typetta-generator.
As a first step of a migration tool we can evaluate the introduction of an explicit migration mechanism, where the user write itself the up/down methods of the migration using the driver directly anche the framework only applies the in a secure way.
A second step could be the one where the platform infers the migration from the model, but it requires a strict connection between model and database schema (introspection/generation).
It should converts the GraphQLResolverInfo into a FindParams accepted by the findAll operation
maxDepth: 0 -> relations are disabled
maxDepth: 1 -> only relations attached to the main entity
maxDepth: n -> ...
Add also a default value as the limit (pageSize)
Fields that relate two entities should have the same scalar type.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.