go-graphkb icon indicating copy to clipboard operation
go-graphkb copied to clipboard

Client Query method is broken

Open jmbass opened this issue 3 years ago • 0 comments

https://github.com/clems4ever/go-graphkb/blob/248e436b3630c94b59eca34f683b82d76e178ebb/internal/client/query.go#L40

CriteoKB explorer now returns the sources as part of an Item object in the response. sources is an array, which results in an unmarshalling error when trying to map the response to a QueryResponse object:

https://github.com/clems4ever/go-graphkb/blob/248e436b3630c94b59eca34f683b82d76e178ebb/internal/client/types.go#L40

I believe that we must either make the Items member of the response an [][]interface{} or make the Items a map[string]interface{} and then implement the adequate changes to the affected methods.

@ShimmerGlass

jmbass avatar Jun 17 '22 12:06 jmbass