helpscout-api-php icon indicating copy to clipboard operation
helpscout-api-php copied to clipboard

Returning threads with initial response: embed=threads

Open cesutherland opened this issue 5 years ago • 4 comments

Hi folks!

I took it for granted that withThreads requested conversations with threads, but I see now that it makes a request for conversations, and then a separate request for each conversations threads. There's a handy API option for requesting conversations together with threads: embed=threads which I saw in the docs.

Does this SDK support requesting embedded threads up front? I don't see an option for that.

cesutherland avatar Nov 20 '19 01:11 cesutherland

Hey,

The SDK's perspective on eager loading actually predates that API functionality and we don't yet support the full initial embedding up front. Instead it makes additional API requests to ensure all the data is loaded. We're tracking requests for this and very much appreciate your feedback. We'll update this thread if we implement this eager loading in the SDK.

bkuhl avatar Nov 20 '19 19:11 bkuhl

Thanks!

cesutherland avatar Nov 21 '19 13:11 cesutherland

@bkuhl this is what I had in mind ­— https://github.com/helpscout/helpscout-api-php/pull/208

I tried not to make assumptions about future "embeddable" entities.

cesutherland avatar Nov 22 '19 20:11 cesutherland

Just wanted to add that I'd love to see this added, cheers :)

JonLaliberte avatar May 06 '20 19:05 JonLaliberte

We're closing this issue due to inactivity. We've moved your request to our backlog of tickets, although we can't tell when we will be able to act on it. Please feel free to reopen if needed. Thank you!

miguelrs avatar Jan 17 '24 11:01 miguelrs