algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
177 stars 45 forks source link

Time frame to exit beta? #6

Closed janosh closed 5 years ago

janosh commented 6 years ago

A Gatsby plugin for Algolia would be awesome and much appreciated! Is there already a timeframe on when to exit beta and add documentation?

Haroenv commented 6 years ago

Thanks for your interest, indeed what's missing to move this from beta ➡️ full release is the following:

  1. more expanded documentation
  2. proper testing strategy
  3. atomic indexing (#5)
  4. indexing only changed objects

For now I didn't have the time yet to squash these bugs, but it definitely works, tested in a few different sites so far.

So a time frame isn't there yet, but I'll make sure to make some time for this when I'm out of holiday and can dedicate some time on this.

Is there anything else you would like to see @Janosh?

janosh commented 6 years ago

@Haroenv Any news yet?

Haroenv commented 6 years ago

Atomic indexing has been done, although I'm still going to do a second pass at another time to use less indexing operations. (indexing only the changes). As well as needing proper tests.

Is there anything you specifically need before using this?

janosh commented 6 years ago

@Haroenv I'm struggling to get indexing to work in this repo. I'm trying to index all pages sourced from Contentful, but no records are added to the index I created with my Algolia account. Instead, running gatsby build I receive the error that data is undefined in gatsby-plugin-algolia's transformer on line 27 of gatsby-config.js.

Could you perhaps take a look at this?

Haroenv commented 6 years ago

I'll take a look at that yes :)

ErisDS commented 5 years ago

I'm having the exact same issue:

Cannot read property 'allSitePage' of undefined

I'm using the exact code from the readme, it errors in the transformer because no data is passed to the function.

The same query works perfectly in the graphql query explorer.

I'm using Gatsby v2 and trying to figure out if there's something that needs migrating?

Haroenv commented 5 years ago

@ErisDS would it be possible to create a minimal example? you can start from the one in the repository :)

ErisDS commented 5 years ago

@Haroenv I will try, what I can do for now is point you at my branch / commit:

https://github.com/TryGhost/docs/commit/bee70212d0aa3a4cb465a3e085c918c3f9057e11

Hopefully that at least shows that my code is near-identical to the readme.

The outcome on gatsby build is:

image

Haroenv commented 5 years ago

So far I've managed to get your site to build and see that index to Algolia seems not to end, but I don't get that error :(

Haroenv commented 5 years ago

Weird to be happy to finally have an error, but I'm happy that I now can start debugging

Haroenv commented 5 years ago

I found the issue (and also a source of grey hairs maybe?) https://github.com/TryGhost/docs/pull/7 and https://github.com/StudentenBildenSchueler/homepage/pull/40

janosh commented 5 years ago

@Haroenv Were you able to reproduce (or even fix) the error in my repo?

ErisDS commented 5 years ago

@Haroenv Thank you for taking the time to do that 🎉

Haroenv commented 5 years ago

@janosh, I actually saw you made the same kind of “mistake” so I didn’t have to try it out. I’m concinced my pr there was necessary and the fix though :)

Haroenv commented 5 years ago

oops, this shouldn't really have closed this issue since it was mixed with the "timeframe out of beta", but I answered that :). As @ErisDS said, I might change the way of passing the query to a more standard way if that makes sense