Samson Amaugo
12/02/2020, 7:54 PMtylim
12/02/2020, 8:55 PMHarun
12/03/2020, 7:45 AMconst date = new Date();
const numberOfDays = 30;
const month = date.setDate(date.getDate() - numberOfDays);
const items = await prisma.items.findMany({ where: { createdAt: { gt: month } } });
But i get an error that says: Argument createdAt: Got invalid value on prisma.aggregateProduct. Provided Json, expected DateTimeFilter or DateTime.
How can i query by datetime?Harun
12/03/2020, 7:47 AMtadejstanic
12/03/2020, 11:56 AMemail_event
to events
?Jonathan
12/03/2020, 11:44 PMusersPagination(filter: { search, count, sort }) {
users {
username
email
etc
}
pageInfo {
count
pageIndex
}
postsPagination(filterForParent: {search, startDate }) <- another filter {
posts {
pages
}
pageInfo {
count
pageIndex
}
}
}
In theory, we are trying to see if it is possible to define some filter on a child, and use that filter in the parent? So that we can define for instance
"Give me 10 users, who contain search
, or if their posts contain search
. Just give me 10 in total" Any clean API's that do something like this?Harsh Makwana
12/04/2020, 7:21 AMERROR: Syntax error while parsing GraphQL query. Invalid input "enum ReminderOn {\n 3", expected OperationDefinition, FragmentDefinition or TypeSystemDefinition (line 519, column 1):
enum ReminderOn {
datamodel.schema
enum ReminderOn {
30MIN
1HR
2HR
}
UddhavNavneeth
12/04/2020, 12:08 PMNikolay
12/04/2020, 2:31 PMChristian Villamin
12/04/2020, 5:15 PMnpx prisma init
to use a different folder location? Also so that npx prima generate
uses that custom prisma location? Thanks a bunch!Christian Villamin
12/04/2020, 5:18 PMDrew Fleming
12/04/2020, 8:18 PMKJReactor
12/05/2020, 12:07 PMJin
12/05/2020, 1:19 PM> Feel free to send me direct message
Paulo Neves
12/05/2020, 9:43 PMcursor
that has always the same value as the column id
. I think that somewhere in the past I saw here in prisma slack someone doing that, but I can't see how I can do it with postgres. Anyone knows?
It's like a view column.Jonathan
12/06/2020, 12:09 PMprisma.$disconnect
? I am running to a problem where with nodemon
, my "reloading" seems to be stuck. I have to explicitly state process.exit
, but even then there are some sub-processes still running (not quite clear if prisma is the only one)
Anyone experiences this as well?tylim
12/07/2020, 12:53 AMtylim
12/07/2020, 12:54 AMtylim
12/07/2020, 12:54 AMChristian Villamin
12/07/2020, 1:20 AMflorin
12/07/2020, 8:40 AMschema.graphql
where I added e new query
type Query {
detailsParameters(windTurbine: String!, windTurbineType: String!, param: String!, action: String!): String!
}
How can I deploy this new change to the production prisma derver, as I did not manage to do it. Thanks in advance:)Drew Fleming
12/07/2020, 2:30 PM(node:37320) UnhandledPromiseRejectionWarning: Error:
Invalid `prisma.formSets.create()` invocation:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(TokenError { code: 334, state: 1, class: 16, message: "The target table \'dbo.FormSetSequence\' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.", server: "dev-dfleming", procedure: "", line: 1 }) })
at PrismaClientFetcher.request (C:\dev\graph-ql-prisma-ta\node_modules\@prisma\client\runtime\index.js:78786:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:37320) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see <https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode>). (rejection id: 3)
(node:37320) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Daniell
12/07/2020, 3:57 PMAwey
12/07/2020, 9:49 PMlinkPreview
query in Nexus? Given a websites url
I would like to be able to get the meta data from that site, description, images, etc. Like when you post a link here. I'm using Nexus Schema and I'm not really sure how to approach this. Any guidance would be appreciated 🙏tylim
12/08/2020, 5:01 PMtylim
12/08/2020, 5:01 PMimport { GraphQLUpload } from 'graphql-upload'
export const Upload = asNexusMethod(GraphQLUpload, 'upload')
tylim
12/08/2020, 5:02 PMany
when i try to use it as argument in mutation, how can i type it?MichaelHindley
12/08/2020, 5:11 PMThe change you are trying to make would violate the required relation 'ModelAtoModelB' between the `ModelA` and `ModelB` models.
In the generated client, I can see that relationship has: “relationOnDelete”:“NONE”, but the table has on delete cascade as generated by the schema.prisma definitions. So how does one define this relationship so that when an owning side of an relationship is deleted, the children are deleted as well?Marvin
12/08/2020, 5:35 PMbntzio
12/09/2020, 4:23 AMmodel Tag {
id Int @id @default(autoincrement())
name String @unique
post Post[] @relation("post_to_tag")
@@map("tag")
}
Modified my by afterwards:
model Tag {
id Int @id @default(autoincrement())
name String @unique
posts Post[] @relation("post_to_tag") <-------- posts instead of post
@@map("tag")
}
Introspects again and overwrites my changes with the 1st code block again.
Any idea why this could be happening? 🙂