RESTful风格,**查询用户信息**, **URL**:/users/{userId}, **HTTP方法**:GET, **请求参数**:无(通过路径参数传递用户ID), **响应数据**:用户详细信息的JSON对象,如 {“userId”: “123”, “name”: “John”, “email”: “john@example.com”},**创建新用户**, **URL**:/users, **HTTP方法**:POST, **请求参数**:包含用户信息的JSON对象,如 {“name”: “Alice”, “email”: “alice@example.com”, “password”: “securepassword”}, **响应数据**:新创建用户的详细信息,如 {“userId”: “456”, “name”: “Alice”, “email”: “alice@example.com”},**更新用户信息**, **URL**:/users/{userId}, **HTTP方法**:PUT, **请求参数**:包含更新后用户信息的JSON对象,如 {“name”: “Alice Smith”, “email”: “alice.smith@example.com”}, **响应数据**:更新后的用户详细信息,如 {“userId”: “456”, “name”: “Alice Smith”, “email”: “alice.smith@example.com”},**删除用户**, **URL**:/users/{userId}, **HTTP方法**:DELETE, **请求参数**:无(通过路径参数传递用户ID), **响应数据**:删除操作的结果,如 {“success”: true},, GraphQL风格,“graphql,# 查询用户信息,query GetUser($userId: ID!) {, user(id: $userId) {, id, name, email, },},`,`graphql,# 创建新用户,mutation CreateUser($name: String!, $email: String!, $password: String!) {, createUser(name: $name, email: $email, password: $password) {, id, name, email, },},`,`graphql,# 更新用户信息,mutation UpdateUser($userId: ID!, $name: String, $email: String) {, updateUser(id: $userId, name: $name, email: $email) {, id, name, email, },},`,`graphql,# 删除用户,mutation DeleteUser($userId: ID!) {, deleteUser(id: $userId) {, success, },},“