Fork me on GitHub
代码改变世界

飞步fireboom 不同库关联查询

2023-06-07 11:59  freefei  阅读(19)  评论(0编辑  收藏  举报

fireboom 关联查询 demo 列表

query MyQuery($skip: Int = 10, $take: Int = 10,$tid:Int) {
 list: iot_device_bill_findManydevice_information(skip: $skip, take: $take) {
   tenant_id @export(as:"tid")
   tenant_info:_join{
     data:iot_core_findFirstsys_tenant (where:{tenant_id:{equals:$tid}}) @transform(get:"tenant_name"){
       tenant_name
     }
   }
   start_time
   device_name
   device_id
   device_code
   id
   del_flag
 }
 count: iot_device_bill_aggregatedevice_information @transform(get: "_count._all") {
   _count {
     _all
   }
 }
}

详情

query MyQuery($id: String = "",$tid:Int) {
  iot_device_bill_findFirstdevice_information(where: {id: {equals: $id}}) {
    device_code
    device_id
    device_name
    create_time
    description
    id
    location
    location_id
    online
    pro_id
    pro_name
    tenant_id @export(as:"tid")
    zuhu:_join{
      zuhuinfo:iot_core_findFirstsys_tenant(where:{tenant_id:{equals:$tid}}) {
        tenant_name
        tenant_type
       
      }
    }
  }
}
@ https://github.com/ranmufei

校友通微信小程序

校友通微信小程序