Steven Vachon
06/04/2019, 11:38 PMmutation ($data: ResumeCreateInput!) {
createResume(data: $data) {
id
}
}
with { "data": {
"firstName: "me",
"location": { "city": "mine" }
} }
erroring with
Variable '$data' expected value of type 'ResumeCreateInput!' but got: {"firstName":"me","location":{"city":"mine"}}. Reason: 'location.city' Field 'city' is not defined in the input type 'LocationCreateOneInput'.
Sanat Mool
06/05/2019, 4:26 AMWhoops. Looks like an internal server error. Search your server logs for request ID: local:cjwir1wfd02dd0776z7bg58d2
Sanat Mool
06/05/2019, 4:26 AMSanat Mool
06/05/2019, 4:26 AMSanat Mool
06/05/2019, 4:26 AMericsonluciano
06/05/2019, 6:55 AMt.field("forgotPassword", {
type: "TriggerPasswordResetPayload",
args: {
email: stringArg()
},
resolve: (parent, { email }, context) => {
const user = context.prisma.user({ email });
if (!user) throw new Error("No user with this email.");
const emailContent = {...}
sgMail.send(emailContent);
return null;
}
});
ericsonluciano
06/05/2019, 6:56 AM"Cannot query field \"id\" on type \"TriggerPasswordResetPayload\".",
Andre Coetzee
06/05/2019, 7:36 AMAndre Coetzee
06/05/2019, 8:48 AMjasonmj
06/05/2019, 2:12 PMAndre Coetzee
06/05/2019, 2:13 PMjasonmj
06/05/2019, 2:15 PMjasonmj
06/05/2019, 2:15 PMjasonmj
06/05/2019, 2:16 PMtype User {
id: ID! @id
email: String! @unique
name: String
posts: [Post!]!
}
type Post {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
published: Boolean! @default(value: false)
title: String!
content: String
author: User!
}
jasonmj
06/05/2019, 2:16 PMjasonmj
06/05/2019, 2:16 PMjasonmj
06/05/2019, 2:31 PM/src/generated/prisma-client/index.ts
does contain: postsConnection: (
args?: {
where?: PostWhereInput;
orderBy?: PostOrderByInput;
skip?: Int;
after?: String;
before?: String;
first?: Int;
last?: Int;
}
) => PostConnectionPromise;
jasonmj
06/05/2019, 2:32 PMkasi M
06/05/2019, 2:56 PMGaurav
06/05/2019, 4:36 PMSteven Vachon
06/05/2019, 5:36 PMquery ($id: ResumeWhereUniqueInput!) {
resume(where: $id) {
coverLetter
positions {
id
}
}
}
with {
"id": {
"id": "cjwj8wq7k01980766ixv2jcy2"
}
}
produces {
"data": {
"resume": {
"coverLetter": "something",
"positions": []
}
}
}
? the returned positions
array is empty for some reason... this is my schema: type Position {
description: String
id: ID! @id
}
type Resume {
coverLetter: String
id: ID! @id
positions: [Position!]!
}
Steven Vachon
06/05/2019, 6:07 PMSteven Vachon
06/05/2019, 6:07 PMHasen
06/05/2019, 6:21 PMSteven Vachon
06/05/2019, 6:22 PMHasen
06/05/2019, 6:22 PMHasen
06/05/2019, 6:22 PMSteven Vachon
06/05/2019, 6:26 PMHasen
06/05/2019, 6:29 PMHasen
06/05/2019, 6:30 PM