Closed mathieucaroff closed 4 years ago
That makes complete sense, your operations would go through the roof if you updated an index on develop; it might make sense if you’re on an unlimited plan and change to a specific index for dev mode.
Would you mind those trade offs?
const queries = [
{
query: repoQuery,
transformer: repoTransformer,
indexName,
settings,
},
]
Currently, a change brought to one of the queries
- either the graphQl query
, the settings
or the transformer
is never tested by gatsby develop
. The code is run for the first time when the developer executes gatsby build
.
As at the moment, I'm mostly making a proof of concept regarding the search feature, so I do not run gatsby build
at all. This is why it took me a bit of time to understand what was going on.
I guess this mainly is something that should be mentioned more clearly in the documentation then.
I guess this mainly is something that should be mentioned more clearly in the documentation then. +1 I had no idea why it wasn't working until reading this post. Thanks for clarifying :)
Today I spent a bit of time reading the code before I realized that
gatsby develop
didn't triggerexports.onPostBuild
, so no data from my queries were uploaded to Algolia. It might be good to advertise it a bit; something like:For reference:
https://github.com/gatsbyjs/gatsby/issues/2698#issuecomment-488041539