Created
April 23, 2022 20:14
-
-
Save mdcarmo/bc1f8b06d8429e3353615d2bcc9a5d93 to your computer and use it in GitHub Desktop.
Exemplo de mutação create graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Field<CustomerType>( | |
"createCustomer", | |
arguments: new QueryArguments(new QueryArgument<NonNullGraphType<CustomerInputType>> { Name = "customer" }), | |
resolve: context => | |
{ | |
var customer = context.GetArgument<Customer>("customer"); | |
return repository.Create(customer); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment