graphql/graphql-add-user

Add New User

Create a new user via mutation

graphql
user
mutation

Command

curl -X POST http://localhost:4000/graphql -H 'Content-Type: application/json' -d '{"query":"mutation { addUser(name: \"Alice\", email: \"alice@example.com\") { id name email } }"}'

Explanation

Creates a new user in the system. Mutations modify data on the server and return the newly created object.

Examples

Add user Bob

mutation { addUser(name: \"Bob\", email: \"bob@example.com\") { id name email } }