Yiğit Rüzgar
04/30/2020, 10:18 AMLars-Jørgen Kristiansen
04/30/2020, 11:49 AMLars-Jørgen Kristiansen
04/30/2020, 1:12 PMDavid Turton
04/30/2020, 3:26 PMDavid Turton
04/30/2020, 3:26 PM@prisma/client did not initialize yet. Please run \"prisma generate\" and try to import it again.\nIn case this error is unexpected for you, please report it in <https://github.com/prisma/prisma-client-js/issues/390>
David Turton
04/30/2020, 3:26 PMDavid Turton
04/30/2020, 3:27 PMStefan Trivuncic
04/30/2020, 4:52 PMMATTHEW CASERES
04/30/2020, 9:34 PMMATTHEW CASERES
04/30/2020, 9:34 PMMATTHEW CASERES
04/30/2020, 9:35 PMMATTHEW CASERES
04/30/2020, 9:49 PMYasir Hussain
05/01/2020, 1:11 AMYasir Hussain
05/01/2020, 1:13 AMYasir Hussain
05/01/2020, 1:15 AMBen
05/01/2020, 3:20 AM<Query query={ALL_SEARCHES_QUERY}>
{({ error, loading, data }) => {
if (error) return <p>Error!</p>;
if (loading) return <p>Loading...</p>;
this.handleData(data);
return <div>query stuff</div>;
}}
</Query>
this.handleData():
handleData = (data) => {
data.allSearches.map((datum) => {
console.log(
`This is the title: ${datum.title} - and this is the URL: ${datum.url}`
);
});
};
Expected console output:
This is the title: titleone - and this is the URL: urlone
This is the title: titletwo - and this is the URL: urltwo
Console output when page loads:
This is the title: titleone - and this is the URL: urlone
This is the title: titletwo - and this is the URL: urltwo
This is the title: titleone - and this is the URL: urlone
This is the title: titletwo - and this is the URL: urltwo
I used "titleone", "titletwo", etc to save space. I am getting the correct variables there, but as you can see it is happening twice. Does anyone have any idea why??? Any help is much appreciated!Rushi Arumalla
05/01/2020, 3:23 AMRushi Arumalla
05/01/2020, 3:23 AMexport const CommentSubscription = subscriptionField('newComment', {
type: 'Comment',
description: 'New Comment Subscription',
args: { recipeId: intArg({ required: true }) },
subscribe: withFilter(
(parent, args, { pubsub }, info) => pubsub.asyncIterator('newComment'),
async (payload, variables) => {
return payload.newComment.recipeId === variables.recipeId
}),
resolve: payload => payload.newComment
})
Corey Snyder
05/02/2020, 2:28 AMCorey Snyder
05/02/2020, 3:23 AMCorey Snyder
05/02/2020, 3:23 AMMarcel Overdijk
05/02/2020, 5:41 AMfindMany
query.
Eg transforming a GET
request like /items?price[lt]=10&available[eq]=true
to a query. The rest endpoint can retrieve many filter criteria and the filter operation might differ. (Off course we will validate first which filter criteria were passed in)Ashiqur Rahman
05/02/2020, 7:55 AMck....
. I need to change that. Is there any way to change this ?Nischal
05/02/2020, 11:21 AMmodel User {
id Int @default(autoincrement()) @id
email String? @unique
fullName String?
password String?
userRole String?
advertise Advertiser
}
model Advertiser {
id Int @default(autoincrement()) @id
companyContactNumber String?
companyName String?
location String?
registeredNumber Int?
verified Boolean?
userId Int
createdBy User @relation(fields: [userId], references: [id])
campaigns Campaign[]
}
not sure why this create query doesn't work
const advertiser = await prisma.advertiser.create({
data: {
companyName,
registeredNumber,
location,
companyContactNumber,
createdBy: {
connect: {
userId: 1,
},
},
},
});
The error i get is
[ Error: Invalid `prisma.advertiser.create()` invocation:
{
data: {
companyName: 'nischal Company2',
registeredNumber: 12232,
location: 'kathmandu, Nepal 1231',
companyContactNumber: '980113405222',
createdBy: {
connect: {
userId: 1
~~~~~~
}
}
}
}
Unknown arg `userId` in data.createdBy.connect.userId for type UserWhereUniqueInput. Did you mean `id`? Available args :
Nischal
05/02/2020, 11:24 AMErik Rutledge
05/02/2020, 11:26 AMNischal
05/02/2020, 11:28 AM[ Error: Invalid `prisma.advertiser.create()` invocation:
The change you are trying to make would violate the required relation 'AdvertiserToUser' between the `Advertiser` and `User` models.
Roy
05/02/2020, 4:00 PMRoy Sivan
05/02/2020, 8:41 PMTEMILOLUWA OJO PHILIP
05/02/2020, 11:28 PM