-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutations having @client fields are not returning server errors to the client. #7565
Comments
@cmnstmntmn Just to make sure, you mean there's a server error for To implement the local field, are you using a local resolver function for that field (passing |
@benjamn no, the mutation SaveTicket(
$ID: Int
$LocationID: Int!
$Type: TicketType!
$Status: TicketStatus!
$Urgency: TicketUrgency!
$PatientID: Int! = 0
) {
SaveTicket(
input: {
ID: $ID
LocationID: $LocationID
Type: $Type
Status: $Status
Urgency: $Urgency
PatientID: $PatientID
}
) {
ID
Type
Status
Patient {
ID
FirstName
LastName
FullName @client
}
}
} resolver export const resolvers = {
Patient: {
FullName({FirstName, LastName}) {
return `${FirstName} ${LastName}`;
}
},
} The FullName resolver it's fine for queries; but it seems to be faulty with mutations. As for resolvers, i'm passing them as options to the AplloClient constructor const apolloClient = new ApolloClient({
cache,
connectToDevTools: false,
typeDefs,
resolvers,
link,
}); |
Having same issue. One field in mutation has |
Hey, i think that the well known issue like this here related to the absence of server errors, is caused by the presence of the
@client
directive inside the mutation response.Removing
@client
fields, is fixing the issue.The text was updated successfully, but these errors were encountered: