Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@vektah vektah released this 15 May 04:50
· 7 commits to master since this release
9d6b85c

This is a pretty large refactor of dataloaden that allows arbitrary types for keys and values.

This removes -slice and -key entirely, and replaces them with 3 mandatory positional arguments:

  • name: The name to use when generating types and constructors
  • key type: the key type as a string in the format (*[])(package.)TypeName
  • value type: the key type as a string in the format (*[])(package.)TypeName

Unlike before with -slice and -ptr these can be nested arbitrarily deeply, for example *[][][]*github.com/my/damn.User is now valid.

for example what used to be

dataloaden -keys int -slice github.com/vektah/dataloaden/example.User	

is now

dataloaden UserSliceLoader int []github.com/vektah/dataloaden/example.User