dataloader icon indicating copy to clipboard operation
dataloader copied to clipboard

Example with a database and graphql

Open ViniciusAtaide opened this issue 3 years ago • 3 comments

could you provide a simple example with any database using the IN clause?

I'm new to dataloader so I'm mostly deducing keys are each id that the resolver provides but I'm not sure.

Thank you

ViniciusAtaide avatar Jun 19 '22 02:06 ViniciusAtaide

The returned value from the conversion from the database too would be nice to understand. I see a for casting one type to another but idk if the mapped result with a repository with id as keys and entities as values are an obligatory approach.

ViniciusAtaide avatar Jun 19 '22 02:06 ViniciusAtaide

taking advantage of the thread may I ask too why in my application it is asking 5 as a string in this codeline https://github.com/graph-gophers/dataloader/blob/4611304016ff21691d98628cf0425274a5c961a6/example/no_cache/no_cache_test.go#L35

ViniciusAtaide avatar Jun 19 '22 03:06 ViniciusAtaide

taking advantage of the thread may I ask too why in my application it is asking 5 as a string in this codeline

https://github.com/graph-gophers/dataloader/blob/4611304016ff21691d98628cf0425274a5c961a6/example/no_cache/no_cache_test.go#L35

just found out that was the same type of my key, uuid. that's why

ViniciusAtaide avatar Jun 19 '22 04:06 ViniciusAtaide