Open nikhilaravi opened 8 years ago
@nikhilaravi just to confirm, the searchId
is a unique id for each search that gets performed by the client so that the UI knows which result it needs to be displaying, right? ❓
@nikhilaravi quick question: are you storing the searchId somewhere on the client?
I ask because if we store it in localStorage
it will prevent the user from having multiple tabs open with different searches...
@nelsonic yes i'm saving it in the redux store. I expect the searchId to be returned from the graphql mutation which starts the search.
@nikhilaravi do you know if the searchId is currently being passed through by search-request-handler
thru SNS to the providers?
@nelsonic it looks like it is sent in the SNS message by the search request handler
. https://github.com/numo-labs/lambda-search-request-handler/blob/master/lib/formatter.js#L18-L21
That looks like its sending everything in the event and id
but what is id
...?
is that the searchId
or the bucketId
...?
Because I'm expecting that to be the bucketId
... see: https://github.com/numo-labs/lambda-ne-classic-package-provider/blob/master/index.js#L19 where I'm using the event.Records[0].Sns.Message.id
as the bucketId
...
@nelsonic ah I am actually referring to the bucketId when I'm talking about the searchId..!
I thought even if we get rid of the idea of search buckets in dynamoDB we can still use the same id as a reference to that particular search.
The json object sent to the server should have the shape: