coolair
V2EX  ›  问与答

你们是用哪种方式后台 API 给数据?

  •  
  •   coolair · Aug 2, 2019 · 1230 views
    This topic created in 2485 days ago, the information mentioned may be changed or developed.
    1 )给出所有字段,前端取自己需要的
    2 )数据库查询取出所有字段,然后根据前端需求过滤后给出
    3 )数据库查询只取前端需要的字段,给出

    还有没有其他更好的方式?
    3 replies    2019-08-02 13:59:55 +08:00
    per
        1
    per  
       Aug 2, 2019 via iPhone
    Graphql
    leopku
        2
    leopku  
       Aug 2, 2019 via Android
    graphql +1
    coolair
        3
    coolair  
    OP
       Aug 2, 2019
    @leopku #2
    @per #1
    Graphql 确实不错,符合我的需求,但是,这个项目不打算用了,下个项目再考虑。谢谢。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1251 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:43 · PVG 01:43 · LAX 10:43 · JFK 13:43
    ♥ Do have faith in what you're doing.