I have some problems when using Fauna and GraphQL
When I use GraphQL to update data, all parameters are required
For example
// Schema
type User {
username: String!
password: String!
phone: String!
}
// Mutation
mutation {
updateUser(id: "xxxxx", {"phone": "+886 110220330"}){
username,
phone
}
}
// Error
But I only want to update the phone
data this time, how can I skip other parameters?
Although it can solve the problem when I delete the Not null
of all attributes in User
type,
But it doesn't look like a good way and safe
// after
// Schema
type User {
username: String
password: String
phone: String
}