jdoyle112
09/13/2018, 5:49 PMpatrickdevivo
09/13/2018, 5:49 PMprisma
creates a graphql api for your database(s) with all the crud operations, which you can then call in your own graphql server, which you will have to set-up and definepatrickdevivo
09/13/2018, 5:50 PMpatrickdevivo
09/13/2018, 5:50 PMpatrickdevivo
09/13/2018, 5:51 PMpatrickdevivo
09/13/2018, 5:51 PMjdoyle112
09/13/2018, 5:52 PMjdoyle112
09/13/2018, 5:56 PMJerry Jäppinen
09/13/2018, 5:58 PMjdoyle112
09/13/2018, 6:19 PMChris
09/13/2018, 6:26 PMconst result = await client.request(`
query {
users {
id
}
}
`);
console.log(result)
>> {"data":{"users":[{"id":"SOMEUSERID"},]}}
My server in DC area:
console.log(result)
>> {"users":[{"id":"SOMEUSERID"},]}
Has anyone else experienced this issue?Moritz
09/13/2018, 8:10 PMauthor: String!
by a locally defined type like author: User!
on a Post
type. Now, when I query the existing api through its binding passing the info
object, it will complain about the info
object, since the author
field specified there is no longer of the scalar type String
but of an object type User
, which is unexpected for the exposed api. Is there a more elegant way to solve this issue then to modify the info
object? Thanks for your input!zstrike
09/13/2018, 11:04 PMasync getDebitTransactionsForWriteOffReport(_, args, ctx: Context, info) { return ctx.db.query.debitTransactions({ where: { _MagicalBackRelation_DebitTransactionsInClaim_every: { _MagicalBackRelation_ClaimsForPatient_every: { _MagicalBackRelation_PatientsInWriteOffReport_every: { id: args.id } } } } }, info)
Andres Montoya
09/14/2018, 4:43 AMAngel Martinez
09/14/2018, 1:57 PMprisma deploy
the following error occurs: Could not find the model table _UserHasProfile in the database
Does anyone know how to solve this?Tracy
09/14/2018, 3:19 PMaman06
09/14/2018, 3:23 PMdennisko
09/14/2018, 3:38 PMhw
09/14/2018, 3:50 PMErrorname
09/14/2018, 4:17 PMSimme
09/14/2018, 5:44 PMcedric
09/14/2018, 8:29 PMD.C. Thompson
09/14/2018, 8:35 PMericsonluciano
09/14/2018, 11:57 PMprisma deploy
User
✖ You are creating a required relation, but there are already nodes that would violate that constraint.
Department
✖ You are creating a required relation, but there are already nodes that would violate that constraint.
here my datamodel
type Department {
createBy: User! @relation(name: "DepartmentsByUser")
company: Company! @relation(name: "CompanyDepartments")
}
type Company {
id: ID! @unique
createBy: User! @relation(name: "CompanyByUser")
department: [Department!]! @relation(name: "CompanyDepartments", onDelete: CASCADE)
}
type User {
id: ID! @unique
department: [Department!]! @relation(name: "DepartmentsByUser", onDelete: CASCADE)
company: Company! @relation(name: "CompanyByUser", onDelete: CASCADE)
}
vacom
09/15/2018, 12:41 AMXiaoyun Yang
09/15/2018, 3:10 AMschema.graphql
like we previously did from src/generated/prisma.graphql
? Do we need to copy and paste the type to schema.graphql
now? Previously I think we can do # import User from './generated/prisma.graphql'
if we want to use the User
type in schema.graphql
, but now in prisma-client, the schema is defined in a .js
file and I am not sure how to import that.ericsonluciano
09/15/2018, 5:40 AMperseon
09/15/2018, 9:40 AMMoritz
09/15/2018, 11:32 AMgraphql-import
work? This is my situation: type Query {
object(where: ObjectWhereUniqueInput!): Object
}
FAILS, unknown type ObjectWhereUniqueInput
. Adding # import ObjectWhereUniqueInput from "./schemas/object-service.graphql"
solves the issue. However, adding # import huhu from "./schemas/object-service.graphql"
Also solves the issue. Is this a bug or am I overlooking something? Should I open an issue?Jerry Jäppinen
09/15/2018, 3:50 PM