Osicka
05/10/2019, 12:33 PMHelmi
05/10/2019, 1:55 PMid_contains
? I use mongoDB, prisma v1.32congy
05/10/2019, 2:25 PMYour token is invalid. It might have expired or you might be using a token from a different project.
Didn't happen before.Ste O'Neill
05/10/2019, 4:00 PMNelson Pecora
05/10/2019, 5:49 PMJunsu Kim
05/10/2019, 5:53 PMdan
05/10/2019, 6:42 PMTimeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
No code has changed, just simply bumping the version for prisma client and server.dan
05/10/2019, 6:44 PMJeff
05/10/2019, 6:48 PMJeany Meza
05/11/2019, 5:55 AMjava.lang.IllegalArgumentException: An SRV host name 'mongo-service-prod' was provided that does not contain at least three parts. It must contain a hostname, domain name and a top level domain.
at com.mongodb.internal.dns.DnsResolver.resolveHostFromSrvRecords (DnsResolver.java:52)
at com.mongodb.ConnectionString.<init> (ConnectionString.java:325)
at com.prisma.deploy.connector.mongo.MongoInternalDatabaseDefs.<init> (MongoInternalDatabaseDefs.scala:9)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabaseDefs$lzycompute (MongoDeployConnector.scala:14)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabaseDefs (MongoDeployConnector.scala:14)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.mongoClient$lzycompute (MongoDeployConnector.scala:15)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.mongoClient (MongoDeployConnector.scala:15)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabase$lzycompute (MongoDeployConnector.scala:16)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.internalDatabase (MongoDeployConnector.scala:16)
at com.prisma.deploy.connector.mongo.MongoDeployConnector.<init> (MongoDeployConnector.scala:18)
at com.prisma.connectors.utils.ConnectorLoader$.loadDeployConnector (ConnectorLoader.scala:39)
at com.prisma.local.PrismaLocalDependencies.deployConnector$lzycompute (PrismaLocalDependencies.scala:83)
at com.prisma.local.PrismaLocalDependencies.deployConnector (PrismaLocalDependencies.scala:83)
at com.prisma.local.PrismaLocalDependencies.<init> (PrismaLocalDependencies.scala:90)
at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1 (PrismaLocalMain.scala:13)
at com.prisma.local.PrismaLocalMain$delayedInit$body.apply (PrismaLocalMain.scala:8)
at scala.Function0.apply$mcV$sp (Function0.scala:34)
at scala.Function0.apply$mcV$sp$ (Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp (AbstractFunction0.scala:12)
at scala.App.$anonfun$main$1$adapted (App.scala:76)
at scala.collection.immutable.List.foreach (List.scala:388)
at scala.App.main (App.scala:76)
at scala.App.main$ (App.scala:74)
at com.prisma.local.PrismaLocalMain$.main (PrismaLocalMain.scala:8)
at com.prisma.local.PrismaLocalMain.main (PrismaLocalMain.scala)
Jonathan Demirgian
05/11/2019, 7:48 PMprisma init
Docker example built into the Prisma CLI doesn't work. Here's the standard boilerplate setup in an empty dir:
Jonathans-Air:prismaex lirum$ ls
Jonathans-Air:prismaex lirum$ prisma init
? Set up a new Prisma server or deploy to an existing server? Create new database
? What kind of database do you want to deploy to? MySQL
? Select the programming language for the generated Prisma client Prisma JavaScript Client
Created 3 new files:
prisma.yml Prisma service definition
datamodel.prisma GraphQL SDL-based datamodel (foundation for database)
docker-compose.yml Docker configuration file
Next steps:
1. Start your Prisma server: docker-compose up -d
2. Deploy your Prisma service: prisma deploy
3. Read more about Prisma server:
<http://bit.ly/prisma-server-overview>
Generating schema... 25ms
Saving Prisma Client (JavaScript) at /Users/lirum/Documents/programming/projects/learndocker/ex5/prismaex/generated/prisma-client/
â•──────────────────────────────────────╮
│ │
│ Update available 1.32.0 → 1.32.2 │
│ Run npm i -g prisma to update │
│ │
╰──────────────────────────────────────╯
Jonathans-Air:prismaex lirum$ ls
datamodel.prisma docker-compose.yml generated prisma.yml
Jonathans-Air:prismaex lirum$ docker-compose up -d
Creating network "prismaex_default" with the default driver
Creating prismaex_mysql_1 ... done
Creating prismaex_prisma_1 ... done
Jonathans-Air:prismaex lirum$
Cool, so they're running and I can check with `docker ps`:
Jonathans-Air:prismaex lirum$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3421e8b8f214 prismagraphql/prisma:1.32 "/bin/sh -c /app/sta…" 4 minutes ago Up 4 minutes 0.0.0.0:4466->4466/tcp prismaex_prisma_1
dba528e010a4 mysql:5.7 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes 3306/tcp, 33060/tcp prismaex_mysql_1
Jonathans-Air:prismaex lirum$
But when I checkout the playground at localhost:4466 in my browser, I'm show a "Server cannot be reached" error message (attached).
This is not what I should be seeing, right? I should be able to inspect the schema from this Playground?Sávio Serra
05/11/2019, 10:02 PMimpowski
05/12/2019, 5:36 AMCannot read property 'deleteManyLoads' of undefined
Junsu Kim
05/12/2019, 8:10 AMyolen
05/12/2019, 12:49 PMzicho
05/12/2019, 4:17 PMzicho
05/12/2019, 4:18 PMzicho
05/12/2019, 4:31 PMTaylor
05/12/2019, 6:28 PMPhilipp Köhler
05/13/2019, 9:42 AMreturn context.prisma.createCode
code: args.code,
description: args.description,
created_by: { connect: { id: args.id }},
tags: { connect: { id: args.tags.id }},
});
The created_by
field works, but the tags
field doesn't, because args.tags
is a list. But I don't know how to resolve this.Andrei Bacescu
05/13/2019, 9:53 AMKarim
05/13/2019, 11:09 AMError: Unknown flag --prototype
Jeroen
05/13/2019, 12:35 PMSven Haiges
05/13/2019, 2:49 PMPetr Homoky
05/13/2019, 3:34 PMglobalSetup
for testing Yoga 2 + Nexus with Jest?evan
05/13/2019, 4:50 PMnode-cron
job for this which starts scheduling on the yoga server start…
Sample Job
import * as cron from 'node-cron'
import {prisma} from './generated/prisma-client'
let cronCounter: number = 0
const updateData = cron.schedule(
'*/1 * * * *',
() => {
prisma.updateCanvas({
where: {id: '1'},
data: {data: `cron data${cronCounter}`},
})
cronCounter++
console.log('cron job: updateData')
},
{scheduled: false},
)
export {updateData}
The cron job runs, but the database isn’t actually updated. I assume this is because its not attached to a request from the graphQL server. Is there any way to implement this type of system?Hajnal Benjamin
05/13/2019, 5:56 PMThe fields annotated with the @id, @createdAt and @updatedAt directives are managed by Prisma and read-only in the exposed Prisma API.
however the generated <Model>CreateInput includes the @id field and a new record can be inserted by custom id. Is it a bug or the documentation is outdated?Bruce He
05/13/2019, 11:48 PMtype User {
id: ID! @id
name: String!
email: String! @unique
password: String!
age: Int
img: String
location: Location
hostedEvents: [Event]! @relation(name: "HostedEvents", onDelete: CASCADE)
joinedEvents: [Event]! @relation(name: "EventMembers", onDelete: CASCADE)
pushNotificationTokens: [PushNotificationTokens]!
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
}
type Event {
id: ID! @id
owner: User! @relation(name: "HostedEvents")
name: String!
imgs: [String]!
description: String
start: DateTime!
end: DateTime!
categories: [Category]!
members: [User]! @relation(name: "EventMembers")
chatRoom: GroupChatRoom!
pendingRequests: [PendingRequest]!
locations: [Location]!
comments: [Comment]!
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
}
Bruce He
05/13/2019, 11:48 PMBruce He
05/13/2019, 11:51 PM