Skip to content

support return all result at once#10

Open
scc02 wants to merge 4 commits intokaelzhang:masterfrom
scc02:return-entire-res
Open

support return all result at once#10
scc02 wants to merge 4 commits intokaelzhang:masterfrom
scc02:return-entire-res

Conversation

@scc02
Copy link
Copy Markdown

@scc02 scc02 commented Feb 4, 2021

这个变动的性质是

  • 新特性提交

需求背景

  1. apollo 一个namespce上多个配置,需要一次获取

实现方案和 API

  1. 参数添加entireRes,用以判断是分批次返回还是一次性返回

对用户的影响和可能的风险

  1. 无(默认按照目前的分批次返回)

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 4, 2021

Codecov Report

Merging #10 (345dabd) into master (f7302d8) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #10   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          391       394    +3     
=========================================
+ Hits           391       394    +3     
Impacted Files Coverage Δ
src/options.js 100.00% <ø> (ø)
src/namespace.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7302d8...345dabd. Read the comment docs.

@kaelzhang
Copy link
Copy Markdown
Owner

我说中文吧,这两个问题在之前的 review 里面我有写

第一个是,我上面标记的,如果使用了 entireRes 之后,那么 this._config 就不会更新,那么用户在直接获取单个 key 的时候,就会拿到老的值

第二,是一个核心的问题,其实我们没有必要引入一个 option,只需要增加一个新的 event 类型,比如叫 all-changes 就可以满足这个需求

@scc02
Copy link
Copy Markdown
Author

scc02 commented Feb 5, 2021

我说中文吧,这两个问题在之前的 review 里面我有写

第一个是,我上面标记的,如果使用了 entireRes 之后,那么 this._config 就不会更新,那么用户在直接获取单个 key 的时候,就会拿到老的值

第二,是一个核心的问题,其实我们没有必要引入一个 option,只需要增加一个新的 event 类型,比如叫 all-changes 就可以满足这个需求

第一个已经修复
第二个,是不是取全部值的情况多,分开取的情况较少,感觉可以直接通过options满足的话,比较方便

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants