coolair
V2EX  ›  问与答

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

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

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