在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):adrien2p/nestjs-graphql开源软件地址(OpenSource Url):https://github.com/adrien2p/nestjs-graphql开源编程语言(OpenSource Language):TypeScript 100.0%开源软件介绍(OpenSource Introduction):[UNMAINTAINED]nest-js-sequelize-jwt and useProject based onHow it works
ConfigurationTo configure put all config file in the Request exampleTo get users
{
"query": "{ getUsers(filter: { search: \"toto\" }) { id, firstName, lastName, email }}"
} Where And the result of this request is : {
"data": {
"getUsers": [
{
"id": "1",
"firstName": "firstName",
"lastName": "lastName",
"email": "[email protected]"
}
]
}
} To get user with cars
{
"query": "{ getUsers(filter: { email: \"toto\" }) { id, firstName, lastName, email, cars {id, brandName, purchaseDate }}}"
} Where And the result of this request is : {
"data": {
"getUsers": [
{
"id": "1",
"firstName": "firstName",
"lastName": "lastName",
"email": "[email protected]",
"cars": [
{
"id": "1",
"brandName": "tesla",
"purchaseDate": "Thu Aug 17 2017 02:00:00 GMT+0200 (CEST)"
}
]
}
]
}
} To update user (is same implementation for all you want)
{
"query": "mutation {updateUser(values:{ id:1, firstName:\"titi\" }){ id, firstName, lastName, email, cars { id, brandName, purchaseDate }}}"
} The And the result of this request is : {
"data": {
"updateUser": {
"id": "1",
"firstName": "titi",
"lastName": "toto",
"email": "[email protected]",
"cars": [
{
"id": "1",
"brandName": "tesla",
"purchaseDate": "Thu Aug 17 2017 02:00:00 GMT+0200 (CEST)"
}
]
}
}
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论