1

如何将以下 SQL 插入查询作为 GraphQL 突变插入执行?

INSERT INTO User (id, name, user_type_id)
VALUES
(1, "Name", (SELECT id FROM UserType WHERE user_type="Guest"))

前提是表(id 列)与表(user_type_id 列)之间存在One to Many关系。UserTypeUser

4

1 回答 1

0

You should checkout an ORM that work with your technology. like 'sequelize' for example.

于 2019-08-30T13:45:57.057 回答