abanoub essam
05/03/2020, 8:34 AMSimon Edelmann
05/03/2020, 10:42 AMblocka
05/03/2020, 12:27 PM.graphqlconfig
and placed into it
{
"projects": {
"ui": {
"schemaPath": "api/graphql/schema.graphql"
}
}
}
Now in one of .ts files I have
import gql from 'graphql-tag'
export default gql`
`
but I get no autocomplete, error reporting, etc. in thereblocka
05/03/2020, 12:27 PMDexter Marks-Barber
05/03/2020, 2:08 PMTaylor
05/03/2020, 3:30 PMJames Fox
05/03/2020, 4:24 PMprisma2@2.0.0-alpha.538
➡️ @prisma/cli@2.0.0-beta.1
. My code compiles, but when I execute a simple query at <http://localhost:8000/graphql>
, the request hangs forever with this in the server output:
prisma:info Starting a postgresql pool with 9 connections.
prisma:info Started http server on 127.0.0.1:51807
Eric McKay
05/03/2020, 4:35 PMprisma.raw
?
E.g:
prisma.posts.findMany({ where: { comments: { gt: prisma.field('likes') } } })
James Fox
05/03/2020, 8:17 PM@relation(fields: [brand_id], references: [id])
) without data loss?
model Product {
id String @id
brand Brand? @relation(fields: [brand_id], references: [id])
brand_id Int? <---- CAN I ADD THIS WITHOUT DATA LOSS?
}
model Brand {
id String @id
}
Adriano Resende
05/03/2020, 9:38 PMprisma.$exists
exist for version 2? To return booleanSebastien La Duca
05/03/2020, 9:57 PMmigrate.lock
? it says to run prisma migrate fix
but it says the command doesn’t exist when I tryAshiqur Rahman
05/04/2020, 12:25 AMTEMILOLUWA OJO PHILIP
05/04/2020, 3:17 AMTEMILOLUWA OJO PHILIP
05/04/2020, 3:18 AMNischal
05/04/2020, 6:35 AMKennedy Otieno
05/04/2020, 7:16 AMcoolestdb=# \d
Did not find any relations.
coolestdb=# \dt
Did not find any relations.
coolestdb=#
Kennedy Otieno
05/04/2020, 7:17 AMprisma:
image: prismagraphql/prisma:1.34
container_name: prisma
restart: always
ports:
- 4466:4466
environment:
SLOW_QUERIES_LOGGING: 'true'
SLOW_QUERIES_LOGGING_THRESHOLD: '0'
PRISMA_CONFIG: |
managementApiSecret: CANTH@CKTH1S
port: 4466
databases:
default:
database: coolestdb
connector: postgres
host: postgres
port: 5432
user: coolestdb
password: coolestpassword
connectionLimit: 3
networks:
- internal
- web
saketh kumar
05/04/2020, 7:19 AMfriends
must specify a @relation
directive: @relation(name: "MyRelation")
✖️ The relation field sent
must specify a @relation
directive: @relation(name: "MyRelation")
✖️ The relation field received
must specify a @relation
directive: @relation(name: "MyRelation")
jt
05/04/2020, 5:32 PMAndrew Peterson
05/04/2020, 7:11 PMprisma-chobo
05/04/2020, 7:36 PMjt
05/04/2020, 11:53 PMinlightmedia
05/05/2020, 3:30 AMLars-Jørgen Kristiansen
05/05/2020, 10:57 AMtype User {
id: ID! @id
todos: [Todo!]!
}
type Todo {
id: ID! @id
author: User! @relation(type: TABLE)
}
How can i migrate to INLINE
without loosing data?
Prisma 1 question btw..Nicolò
05/05/2020, 11:40 AMtype User {
id: ID! @id
name: String!
posts: [Post!]!
}
type Post {
id: ID! @id
title: String!
published: Boolean! @default(value: false)
author: User @relation(link: INLINE, "PostAuthor")
}
If I query the post I would like to have the id of user so I can then use it directly from a second level resolver.
const posts = await db.posts()
Its a 1:n relation so the key is stored on the Post entity. With SQL it would be a simple select *
And yes we will migrate away from prisma1 but for now we have to fix current not working stuff.Peter Albert
05/05/2020, 1:28 PMMickaël Oth
05/05/2020, 1:54 PM{ id: 1, workspace: 1 }
, but got an error because we can only update where with "UniqueInput" keys. I guess this is not a bug but a choice, but is there any workaround to do what I want ?chris meurer
05/05/2020, 5:00 PMYasir Hussain
05/06/2020, 12:40 AMtype Student {
id: ID! @id
createdAt: DateTime! @createdAt
name: String!
email: String! @unique
password: String!
phone: String
photo: ImageFile @relation(name: "PhotoToFile")
coverPhoto: ImageFile @relation(name: "CoverPhotoToFile")
bio: String
dob: DateOfBirth
gender: Gender! @default(value:OTHER)
role: Role! @default(value:STUDENT)
address: String
classRoooms: [ClassRoom!]
socialLinks:[SocialLink!]}
type ImageFile {
id: ID! @id
assetId: String!
publicId: String!
url: String!
secureUrl: String!
}
and my type resolver:
const Student = {
async photo(parent, args, { prisma }, info) {
return prisma.query.student({ where: { id: parent.id } }).photo();
},
};
module.exports = Student;
Error:Yasir Hussain
05/06/2020, 12:42 AM