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