V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
seaguest
V2EX  ›  问与答

这是什么规范?

  •  
  •   seaguest · 2019-04-03 11:16:40 +08:00 · 977 次点击
    这是一个创建于 1821 天前的主题,其中的信息可能已经有所发展或是发生改变。

    发现一个 app 的请求都只是一个 url,POST 请求的 body 指定了一些返回的参数,结构,貌似可能背后使用微服务实现的,有人知道这个是什么情况吗?

    请求的 body json 是这样的:

    [
      {
        "variables": {
          "count": 10,
          "page": 1,
          "params": "device=android&ep=product&src=wishlist&item=5&page=1&user_id=321"
        },
        "operationName": null,
        "query": "query wishlis--此处详见下面这段"
      }
    ]
    
    query wishlist($page: Int, $count: Int, $params: String){
      wishlist(page: $page, count: $count){
    
          has_next_page
          total_data
          items {
            id
            name
            url
            image_url
            raw_price
            condition
            available
            status
            price
            minimum_order
            wholesale_price {
              minimum
              maximum
              price
            }
            shop {
              id
              name
              url
              gold_merchant
              official_store
              status
              location
    
            }
            preorder
            badges {
              title
              image_url
            }
            labels {
              title
              color
            }
          }
          pagination {
            next_url
          }
      }
    
      productAds: displayAdsV3(displayParams: $params) {
          status {
            error_code
            message
          }
        header {
          process_time
          total_data
        }
        data{
          id
          ad_ref_key
          redirect
          sticker_id
          sticker_image
          product_click_url
          product_wishlist_url
          shop_click_url
          product{
            id
            name
            image{
              m_url
              s_url
              xs_url
              m_ecs
              s_ecs
              xs_ecs
            }
            uri
            relative_uri
            price_format
            wholesale_price {
              price_format
              quantity_max_format
              quantity_min_format
            }
            count_talk_format
            count_review_format
            category {
              id
            }
            product_preorder
            product_wholesale
            free_return
            product_cashback
            product_new_label
            product_cashback_rate
            product_rating
            top_label
            bottom_label
          }
          shop{
            id
            name
            domain
            location
            city
            gold_shop
            gold_shop_badge
            lucky_shop
            uri
            owner_id
            is_owner
            badges{
              title
              image_url
              show
            }
          }
          applinks
        }
      }
    }
    
    1 条回复    2019-04-03 12:00:12 +08:00
    sheeta
        1
    sheeta  
       2019-04-03 12:00:12 +08:00
    GraphQL
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1002 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:27 · PVG 03:27 · LAX 12:27 · JFK 15:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.