Closed damour closed 5 years ago
Merging #24 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #24 +/- ##
=======================================
Coverage 81.91% 81.91%
=======================================
Files 2 2
Lines 94 94
=======================================
Hits 77 77
Misses 16 16
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
example/user.go | 0% <ø> (ø) |
:arrow_up: |
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 ce6bd88...3b57df7. Read the comment docs.
Can we preserve BC by defaulting is pointer to is slice?
If we need a bc break it might be time to parse a type string a little better, eg -type []*foo.User
Can we preserve BC by defaulting is pointer to is slice?
Yes. To preserve BC we need something like this: 1) if slice=false default pointer=true 2) if slice=true default pointer=false
IMHO this approach is not looks consistent and intuitive for users.
If we need a bc break it might be time to parse a type string a little better, eg
-type []*foo.User
Good suggestion! I'll remove slice flag from https://github.com/vektah/dataloaden/blob/master/dataloaden.go#L13 and add type parsing.
@vektah done, PTAL.
I need this too.
I would love to help in development but as I am still learning Go I don't know how. You are doing a great job.
Closing in favor of https://github.com/vektah/dataloaden/pull/28
For now there is no way to return slice of pointers to value (common case in grpc for repeated fields). Proposed add new
-pointer
flag that can works with/without-slice
option. This is backward incompatible change.