Andreas Groos
06/06/2020, 1:04 PMheroku
. Builds fine locally. Fails when I do git push heroku master
. The same happens when I clone the typscript graphql in the examples
repo, it fails to deploy with the same error message. After heroku runs npm run generate
it can't find model
, line 134+ Any tips?Philipp Rajah Moura Srivastava
06/06/2020, 4:26 PMAlejandro Sanchez
06/06/2020, 6:22 PMCorey Snyder
06/06/2020, 6:53 PMImages
table is deleted, I want a script to be kicked off to make a call to my AWS Lambda image service to remove that item from S3 bucket so I’m not storing an image with no references. Obviously I can write some logic around this and add it to every place which may cascade into row being removed from Images but it would be a lot easier if I could just hook into it somehow. Thanks!Corey Snyder
06/07/2020, 1:55 AMcontext.prisma.product({ id: args.id })
Corey Snyder
06/07/2020, 2:22 AMdatamodel.prisma
type Product{
id: ID! @id
images: [Image] @relation(onDelete: CASCADE)
}
When this is called, would you expect the images to all be deleted for that product?
await context.prisma.deleteProduct({ id: args.id })
Because that’s totally not what’s happening. Images rows are being left hanging with nothing linking to them.Daniel Park
06/07/2020, 2:31 AMDaniel Park
06/07/2020, 2:31 AMSamet
06/07/2020, 9:06 AMCompany -> Service -> Specialty -> Sub-Specialty
Each table will have only unique records. I tried creating a relations table but couldn't figure it out. How can I create this structure? Here is the datamodel I have right now:
type Company {
id: ID! @id
name: String! @unique
}
type Service {
id: ID! @id
name: String! @unique
companies: [Company]! @relation
specialties: [Specialty] @relation
}
type Specialty {
id: ID! @id
name: String! @unique
companies: [Company]! @relation
services: [Service] @relation
sub_specialties: [Specialty] @relation
}
Gabriel Benson
06/07/2020, 11:59 AMDaniel Gustaw
06/07/2020, 6:48 PMAlejandro Sanchez
06/08/2020, 2:16 AM“operationName”:“singleUpload”,“variables”:{“file”:null}
Alejandro Sanchez
06/08/2020, 7:11 AMLogan Lee
06/08/2020, 3:26 PMAlejandro Sanchez
06/09/2020, 5:35 AMCannot destructure property 'createReadStream' of 'file' as it is undefined.
Arthur Hirel
06/09/2020, 6:59 AMWill
06/09/2020, 11:14 AMArcticSpaceFox
06/09/2020, 12:06 PMOmar Nasr
06/09/2020, 1:49 PMsourabh
06/09/2020, 4:11 PMcfree
06/09/2020, 5:00 PMLarry Hengl
06/09/2020, 5:27 PMconst { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
const result = await prisma.raw`SELECT * FROM Users;`
(v2beta8, v2beta9 and v2.0 today). I removed and reinstalled all libs and hit the same snag. I tried adding sql and raw to the require, but those are for sql templating and had no effect. Any ideas? Thx!Robert Hall
06/09/2020, 9:26 PMJuan Pablo Yamamoto
06/09/2020, 9:28 PMPhilipp Rajah Moura Srivastava
06/09/2020, 11:10 PMSlackbot
06/10/2020, 10:42 AMTiago Correia
06/10/2020, 3:11 PMimport { makeSchema } from '@nexus/schema';
import * as types from './graphql';
import path from 'path';
export const schema = makeSchema({
types,
outputs: {
schema: path.join(__dirname, 'generated', 'schema.graphql'),
typegen: path.join(__dirname, 'generated', 'nexus.ts'),
},
typegenAutoConfig: {
contextType: 'Context.Context',
sources: [
{
source: require.resolve('./context'),
alias: 'Context',
},
],
},
});
and when I try to generate it by running
ts-node --transpile-only src/schema
I have two problems, one of them is because my resolvers call files that either have a db or redis connection and since they are not using lazy connections I get errors related to the connection failure and the generation stops, the other one is because im using this package https://www.npmjs.com/package/env-var for env variables which makes it easier to require env variables and ensure their types, so when I try to generate the schema there are files that depend on this env variables so I get errors because of the env variables not being present
To keep using nexus and work around this issues I updated my redis and db connection to be lazy which solves that problem and for the env variables im setting them using env-cmd package
the command now looks as follow
env-cmd ts-node --transpile-only src/schema
when I use env-cmd on the command it runs without errors but sadly no files are generated, any clue why? sorry for the long postthevinci
06/10/2020, 3:36 PMthevinci
06/10/2020, 3:42 PMthevinci
06/10/2020, 3:50 PM