Skip to content
Advertisement

GraphQL – “Field “updateOwner” of type “Owner!” must have a selection of subfields. Did you mean “updateOwner { … }”?”

I’m trying to get Mutation Update query in GraphQL Playground. I’m basic level in GraphQL and in learning phase. I don’t know how to create udpate Mutation for the below Owner code. Any idea what I’m missing in my code / query?

—Resolver—

JavaScript

—Service—

JavaScript

—dto—

JavaScript

—entity—

JavaScript

—schema—

JavaScript

—GraphQL Query (I don’t know whether it is correct or wrong)

JavaScript

—error—

JavaScript

Advertisement

Answer

You need to make a selection of subfields to return (even if you’re not interested in any):

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement