从表中查询10条数据
{user_info(_limit: 100) {idname}
}
根据id查询数据
{user_info(_where: {id: 1727515006802587648}_order_by: {create_time: _desc}_limit: 10) {idname}
}
外键联表查询(特别注意写法:update_by.id):
{speaker_info(update_by.id: {_eq: 1729043650301321216}, _limit: 10) {idupdate_by {idnameuinowner}create_by {id}}
}
##另一种写法:
{speaker_info(_where: {update_by.id: 1729043650301321216}_order_by: {create_time: _desc}_limit: 10) {idnameupdate_by {idnameuinowner}}
}
根据表id更新数据
mutation update {speaker_info(_where: {id: "1732677390281072640"}_set: {expire_time: "1765096011"})
}
根据多条件查询
{speaker_info(_where: {status: 1, expire_time: {_lt: 1714360107}}_order_by: {create_time: _desc}_limit: 10) {apply_uinidnameexpire_time}
}
关联关系的多表深层条件过滤筛选
{speaker_info(apply_user.id: {_eq: 1729043650301321216}, _limit: 10) {idnameupdate_by {idnameuinowner}apply_user {idname}}
}
批量更新/查询
##更新
mutation update {events_issue_speaker__c(_where: {id: { _in: [1764840774811058178, 1764840774811058177] }}_set: {cost_status__c: 1})
}
##查询{events_meeting(_where: {meeting_status: 1, create_time: {_lte: 1708312146}, issue.speaker_rel.cost_status__c: 1}) {idmeeting_nameissue{idmeeting_idspeaker_rel{issue_id__ccost_status__cnameid}}}
}