oorestisime / gatsby-source-instagram

Create nodes from instagram posts hashtags and profiles

Home Page:https://gatsby-src-instagram.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can use version 0.6.1, but not 0.9.0 (Cannot query field "allInstaNode" on type "Query") [Gatsby 2.27.0]

janek opened this issue · comments

I was struggling to use gatsby-source-instagram in my project (or in a fresh Gatsby project), but I was able to run it in a starter I found.

I eventually was able to resolve my issues by downgrading the version to the one that the starter uses, which is enough for me, but I wanted to report the problem.

In a fresh project, I'm doing:

gatsby new clean-starter https://github.com/gatsbyjs/gatsby-starter-default
cd clean-starter
npm install --save gatsby-source-instagram
<edit config to add the plugin to gatsby>
gatsby develop

The result is Cannot query field "allInstaNode" on type "Query" if I try to use allInstaNode in useStaticQuery. I also can't use it in the GraphiQL console. Downgrading resolves that.

I'm using Gatsby 2.27.0. Let me know if you need me to reproduce it or provide any other details.

Did you check #24 ?

Yes. I read most of it, but the only solutions I found that worked for someone were to remove the plugin and install it again (which I tried unsuccessfully). I could have missed something, because it's a large thread.

I also thought that is slightly different, because it also breaks for me locally, and not only on Netlify and because it's a new observation that some versions of the plugin work, but others not.

I now checked and it unfortunately breaks on Netlify, too - regardless of the version in package.json.

Let me know if you'd like me to comment on that issue instead, and close this one. And thank you for responding so quickly and for your work on this! I'm super glad to be able to use it!

I was able to get things working on Netlify by using a newer version together with using a numerical instagram ID instead of the username.

It was my bad for trying with the username, I can see now that the README suggests ID. I guess I was fooled by the fact that it sometimes works and by the codebase of the starter I found (they used username, which perhaps was the way to do it in the past?).

Looking at #24 again was very helpful and I ended up finding the solution in this thread on Netfliy forums that has been linked within.