prisma

How to use Prisma 2 CLI on Heroku

佐手、 提交于 2021-02-10 14:44:55
问题 I have deployed NestJs application on Heroku which uses Prisma 2, but when I run the command npx prisma --version on heroku bash I get Prisma CLI version: prisma/1.34.10 (linux-x64) node-v14.15.0 but I have installed prisma 2.11.0, I want to use Prisma 2 cli to introspect my existing database, and run prisma generate. 回答1: I managed to introspect my existing database and run prisma generate by adding heroku-postbuild command on my package.json in scripts section as show below: { "scripts": {

How to use Prisma 2 CLI on Heroku

风格不统一 提交于 2021-02-10 14:42:57
问题 I have deployed NestJs application on Heroku which uses Prisma 2, but when I run the command npx prisma --version on heroku bash I get Prisma CLI version: prisma/1.34.10 (linux-x64) node-v14.15.0 but I have installed prisma 2.11.0, I want to use Prisma 2 cli to introspect my existing database, and run prisma generate. 回答1: I managed to introspect my existing database and run prisma generate by adding heroku-postbuild command on my package.json in scripts section as show below: { "scripts": {

How to fix 'Variable “$_v0_data” got invalid value' caused from data types relation - Mutation Resolver

守給你的承諾、 提交于 2021-01-29 11:28:48
问题 I am trying to setup relations between types and wrote a resolver to run a mutation that create the list values but getting the below error here is my mutation file async createList(parent, args, ctx, info) { const list = await ctx.db.mutation.createList( { data: { project: { connect: { id: args.projectId } }, ...args } }, info ); return list; } and here is my datamodel type Board { id: ID! @id title: String! createdAt: DateTime! @createdAt updatedAt: DateTime! @updatedAt lists: [List]! }

Prisma 2 query to return records only that are associated with ALL of the provided tag IDs

和自甴很熟 提交于 2021-01-04 03:25:17
问题 I have tables Principles and Tags. And there is a many-to-many relation between them (joined implicitly). Without using prisma.raw , how can I run the following query? SELECT p.id, p.title, p.description, p.createdAt, p.modifiedAt FROM principle p WHERE EXISTS (SELECT NULL FROM _PrincipleToTag pt WHERE pt.B IN (${tagIds.join(',')}) AND pt.A = p.id GROUP BY pt.A HAVING COUNT(DISTINCT pt.B) = ${tagIds.length}) How can I update this Prisma 2 query such that the principles returned are only

Prisma 2 query to return records only that are associated with ALL of the provided tag IDs

佐手、 提交于 2021-01-04 03:22:52
问题 I have tables Principles and Tags. And there is a many-to-many relation between them (joined implicitly). Without using prisma.raw , how can I run the following query? SELECT p.id, p.title, p.description, p.createdAt, p.modifiedAt FROM principle p WHERE EXISTS (SELECT NULL FROM _PrincipleToTag pt WHERE pt.B IN (${tagIds.join(',')}) AND pt.A = p.id GROUP BY pt.A HAVING COUNT(DISTINCT pt.B) = ${tagIds.length}) How can I update this Prisma 2 query such that the principles returned are only

Prisma 2 query to return records only that are associated with ALL of the provided tag IDs

我的梦境 提交于 2021-01-04 03:22:10
问题 I have tables Principles and Tags. And there is a many-to-many relation between them (joined implicitly). Without using prisma.raw , how can I run the following query? SELECT p.id, p.title, p.description, p.createdAt, p.modifiedAt FROM principle p WHERE EXISTS (SELECT NULL FROM _PrincipleToTag pt WHERE pt.B IN (${tagIds.join(',')}) AND pt.A = p.id GROUP BY pt.A HAVING COUNT(DISTINCT pt.B) = ${tagIds.length}) How can I update this Prisma 2 query such that the principles returned are only

研究发现:超过45万个云网络连接中带有COVID-19主题恶意软件

Deadly 提交于 2020-08-10 02:39:04
Palo Alto Networks(派拓网络)威胁情报团队Unit 42的研究人员发现,公有云基础设施与传播COVID-19主题恶意软件的域名已建立了通信。此前,Unit 42曾于3月末发表过一篇署名文章,讨论了恶意攻击者利用新冠病毒(COVID-19)发起的各类攻击。Unit 42研究人员试图通过更深入的研究,进一步确定公有云基础设施中是否发生着COVID-19相关的恶意事件。而一旦发现这一活动迹象,企业机构又应如何采取防护措施? 研究人员发现了300多个以COVID-19为主题的恶意软件样本,这些样本与20个独立IP地址和域名入侵指标(IOC)建立了通信。通过查询Prisma Cloud在2020年3月1日至4月7日间与这20个可疑入侵指标的网络连接,研究人员发现,27个独立云环境中共有453,074个独特网络连接(参见图1)。 · 超过45万个云网络连接中带有COVID-19主题恶意软件入侵指标(IoC) · 覆盖27个独立且存在潜在入侵风险的云环境 · 明确迹象表明,与执行COVID-19主题恶意软件相关的命令与控制(C2)操作的节点已建立通信 由于研究人员无法查看网络流量,也没有收到曾发起网络连接的恶意软件样本,因此目前还无法确定这27家企业机构实际上是否已受到COVID-19主题恶意软件攻击。尽管如此,我们仍应将这些网络连接视为高度可疑

Run MySQL on Port 3307 Using Docker Compose

依然范特西╮ 提交于 2020-02-27 05:04:29
问题 I am trying to create multiple Prisma database services on a single machine. I have been unable to create a MySQL database on a port other than 3306 using Docker Compose. docker-compose.yml version: '3' services: hackernews: image: prismagraphql/prisma:1.8 restart: always ports: - "${CLIENT_PORT}:${INTERNAL_PORT}" environment: PRISMA_CONFIG: | port: $INTERNAL_PORT managementApiSecret: $PRISMA_MANAGEMENT_API_SECRET databases: default: connector: mysql host: mysql port: $SQL_INTERNAL_PORT user:

prisma 服务器端订阅试用

倖福魔咒の 提交于 2020-02-23 05:00:04
graphql 协议是支持数据的实时订阅功能的(一般基于websocket 进行实现) prisma 支持客户端订阅以及服务器端订阅(类似webhook),可以方便将 数据推送后端服务 目的 prisma 实现这个功能是方便集成当前的serverless 基础设施,当前支持的是通过webhook 的模式进行时间传递 参考配置 endpoint: ${env:PRISMA_ENDPOINT} secret: ${env:PRISMA_SECRET} datamodel: database/datamodel.graphql subscriptions: userChangedEmail: webhook: url: http://example.org/sendSlackMessage headers: Content-Type: application/json Authorization: Bearer cha2eiheiphesash3shoofo7eceexaequeebuyaequ1reishiujuu6weisao7ohc query: | subscription { user(where: { mutation_in: [UPDATED] }) { node { name email } } } 触发条件 mutation { createUser(data:{