-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant get gatsby-source-github-api to load properly #23
Comments
Maybe take a look at this: In particular, you do not really get any data so it's possible that the query that you are using is invalid. Let me know if that helps and if it doesn't, give me a link to your repo and/or a github gist with the relevant code from I hope that helps! |
Unfortunately I faced the same problem. Couldn't get the plugin to provide the GitHub queries. |
Does anyone have an update on this? I'm unable to get it to work in Gatsby 4.10.3 and I've asked on StackOverflow: "Why am I unable to get any organization repositories from gatsby-source-github-api?" |
author here. @soVader I think you are missing an ending so instead of exports.githubApiQuery = `
query($github_login: String!, $repo_count: Int!){
viewer {
organization(login: $github_login) {
login
id
location
name
url
repositories(first: $repo_count, privacy:PRIVATE) {
nodes {
id
name
openGraphImageUrl
createdAt
stargazerCount
url
description
}
}
}
}
` it should be exports.githubApiQuery = `
query($github_login: String!, $repo_count: Int!){
viewer {
organization(login: $github_login) {
login
id
location
name
url
repositories(first: $repo_count, privacy:PRIVATE) {
nodes {
id
name
openGraphImageUrl
createdAt
stargazerCount
url
description
}
}
}
}
}
` Let me know if that fixes it (or if it helps) |
@ldd thanks for reaching out really appreciate it. I've built and tested my query in explorer and in Postman with the token as my password using the query of:
variables:
my gatsby-config.js for the plugin:
the above query works in Postman and Explorer. Let me delete everything and start over after a reboot, VSC update and rebuild my config. |
Hi,
Sorry if this is not the right place to post this but I cant seem to get this to load up properly.
I goto localhost:8000/___graphql I do now have the option of allGithubData/githubData however there is no user/repo there.
Current gatsby-node.js file
.env file seems to be working fine for other plugins so I don't think that's the problem.
Have tried uninstall package globally and from --save and reinstalling.
What am I doing wrong?
Edit: no issues thrown on gatsby develop
The text was updated successfully, but these errors were encountered: