cedric
10/17/2018, 1:31 AMcedric
10/17/2018, 1:31 AM$ node
> const { prisma } = require('./generated/prisma-client')
undefined
> prisma.$raw("SELECT 1")
TypeError: prisma.$raw is not a function
cedric
10/17/2018, 1:31 AMsenorcodecat
10/17/2018, 10:04 AMsenorcodecat
10/17/2018, 10:05 AMjoar
10/17/2018, 10:54 AMartindaniel
10/17/2018, 11:07 AMgraphql-shield
together with apollo-errors
?
Throwing custom apollo errors in the permission rules is not working for mejdoyle112
10/17/2018, 1:47 PMpanzupa
10/17/2018, 6:27 PM3KB
it needs over 2 seconds. What can I do?Bruce
10/17/2018, 6:50 PMschema: path/to/file
config though, and I don't want to have to generate an extra duplicate file just for this if I don't have to. Is there any way to get this setup without doing that?Lucca
10/17/2018, 7:06 PMtheom
10/17/2018, 9:54 PMprisma deploy --env-file variables.env
My variables.env file reads as follows:
FRONTEND_URL="<http://localhost:7777>"
PRISMA_ENDPOINT="<https://eu1.prisma.sh/6e240757-4cce7e/sick-fits/dev>"
PRISMA_SECRET=""
APP_SECRET=""
STRIPE_SECRET=""
PORT=4444
My prisma.yml file reads as follows:
endpoint: ${env:PRISMA_ENDPOINT}
datamodel: datamodel.prisma
# secret: ${env:PRISMA_SECRET}
hooks:
post-deploy:
- graphql get-schema -p prisma
My datamodel.prisma file reads as follows:
type User {
id: ID! @unique
name: String!
}
What is the issue here?Harshit
10/18/2018, 12:40 PMHarshit
10/18/2018, 12:42 PMnilan
10/18/2018, 12:43 PMJP
10/18/2018, 5:27 PMprisma is using the postgres-db container as its database. Instead of referencing the database host via an IP address or URL, it simply references the postgres-db image as the database host:
I can connect to my DB using docker exec -it postgres psql -U prisma
, but how do I connect via a GUI like Postico? Postico expects a host like this:
This gives the error "Hostname not found". Can anyone advise if this is possible?timqian
10/19/2018, 4:09 AMhinsxd
10/19/2018, 6:14 AMtype Post {
id: ID!
comments: [Comment!]!
}
type Comment {
id: ID!
user: User!
comment: String!
}
What is the best way to append a new comment to the post? If I add a field post: Post!
into Comment
, it feels too verbose. Is it a common way to always implement 2-way relations?hinsxd
10/19/2018, 6:17 AMLucas Munhoz
10/19/2018, 7:09 AMfragmentReplacements
with mutations?kitze
10/19/2018, 9:49 AMWhateverWhereInput
types in the main schema.graphql
file? Previously it was # import WhateverWhereInput from "prismageneratedschemafile.graphql"
ervindraganovic
10/19/2018, 10:01 AMSach97
10/19/2018, 10:04 AMnuno
10/19/2018, 10:17 AMMathias Kandelborg
10/19/2018, 1:34 PMconst order = await ctx.db.query.order({ where: { id } });
and log the result; all of the fields aren't retrieved. I'm baffled by this, there's no apparent explanation and of course no errors. So how do i retrieve all the fields from my type? And as an extra, why aren't they already retrieved?
I'm sorry if this message is too long, furthermore I'd like to acknowledge my lack of technical information. I'd be happy to elaborate on anything.
Anyways, have a nice day! βοΈlawjolla
10/19/2018, 1:42 PMFuturekam
10/19/2018, 6:32 PMTanner
10/19/2018, 7:05 PM# import * from './generated/prisma.graphql';
type Mutation {
createUser(data: UserCreateInput): User
...
Jubal Mabaquiao
10/20/2018, 3:49 AMtype Contestant {
id: ID! @unique
createdAt: DateTime!
email: String! @unique
entries: [Entry!]!
}
type Entry {
id: ID! @unique
createdAt: DateTime!
contestant: Contestant!
contest: Contest!
}
type Contest {
id: ID! @unique
title: String!
slug: String! @unique
answer: String!
entries: [Entry!]! //unique entry contestant?
}
doums
10/20/2018, 7:14 AMdocker-compose up -d
on the second project to start it, I get some error and conflict.
docker-compose up -d
Creating volume "prisma_postgres" with default driver
WARNING: Found orphan containers (drop_db, drop-prisma) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating prisma_postgres_1 ...
Creating prisma_prisma_1 ... error
ERROR: for prisma_prisma_1 Cannot start service prisma: driver failed programming externCreating prisma_postgres_1 ... done
3e61c908b2d6280040b1): Bind for 0.0.0.0:4466 failed: port is already allocated
ERROR: for prisma Cannot start service prisma: driver failed programming external connectivity on endpoint prisma_prisma_1 (e343e095d8dcb4c7e508e54c4da677293e0f30d1960e3e61c908b2d6280040b1): Bind for 0.0.0.0:4466 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
So yes I think I have to change the port for one project. But even if I do that what about this WARNING: Found orphan containers (drop_db, drop-prisma) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
?