egg
egg copied to clipboard
🥚 Born to build better enterprise frameworks and apps with Node.js & Koa
## What happens? ``` const params = { id: 3, plan_name: 'testAdd_upd999', plan_no: '3452422424', begin_date: '2019-12-15', end_date: '2020-02-11', amount: 23231.13 }; await this.app.mysql.update('plan', params) ``` 使用egg-mysql 数据库, 上面执行后数据库 plan 表更新成功,但是...
比如 users 库中 有 user202002, user202003 按月拆分的表,请问如何获取对应表的数据? 例: mongoose.model('User', UserSchema, 'user202002'); 中 user202002 如何做到可设置 
How can I enable plugin at runtime? See https://github.com/eggjs/egg/issues/3262#issuecomment-444483287 I want to have a disabled redis in workers and enable it later at some worker startup
我看最新版本的egg-graphql agent.js 和app.js都在加载schema connector ,agent.jst应该不用加载schema connector的,如果确认 我可以发个pr
配置跟以前不变,使用方法就是在app/graphql 增加了一层用来分区各个模块,比如: ```javascript // 配置 exports.graphql = { router: '/graphql', // 是否加载到 app 上,默认开启 app: true, // 是否加载到 agent 上,默认关闭 agent: false, // 是否加载开发者工具 graphiql, 默认开启。路由同 router 字段。使用浏览器打开该可见。 graphiql: true,...
`graphql` 在授权这块目前有好的方案吗? 参考之前的 issue 总共两种方案: 1. 授权代码分散在每个业务的 `resolver` 里 1. 加中间件拦截 登录验证之类的,分散在各个业务 `resolver` 里确实不友好。加中间件方式 `query` 里面全是字符串,要手动去解析或正则匹配吗?都感觉都不太理想。 ```graphql type Query { # 登录 login(username: String! password: String!): User! # 登出 logout:...
如果线上的safedomain 是 xxx.xx.com 本地开发的时候一般是 xxx.xx.com:7001, 这样会需要在domainwhitelist里面配一个带端口的地址。 我们本地开发的时候,是不是可以默认做端口忽略? 比如 ``` cors: {origin: function judgeWithoutPort(ctx) { const origin = ctx.get('Origin'); const hostname = url.parse(origin).hostname; if (ctx.isSafeDomain(hostname)) { return origin; } return '';...
Hello, ```Egg-graphql``` currently support middleware of node solution ? Our node server only make data conversion, and through the ```Restful API``` communication with backend ( java / go .etc ).We...
fork 了一个版本,基于 v4 实现 ctx class 模式,方便让 sql 请求与 http ctx 上下文发生关联。 https://github.com/eggjs/sequelize/tree/v3 ## 需要实现的功能 - [ ] 基于 ctx 的 model => ContextModel 和 ContextSequelize,自动传递 ctx 上下文 - [...
* **Node Version**: all * **Platform**: Intel Xeon The number of workers is hard-coded in `dispatch.js` of all cases e.g. : https://github.com/eggjs/benchmark/blob/master/simple/dispatch.js#L5-L8 And the number of threads used to run...