Comments (3)
Oh, man, that's revelation for me, didn't know it's possible at all...
Thank you so much for the info and for your time! 😄
👍
from gatsby-source-github-api.
So! I am not sure if I understand you correctly, but let me give you an example:
https://github.com/ldd/gatsby-starter-github-portfolio/blob/master/gatsby-config.js
In there, I use the graphQL API to access the readme.md text. In that same project, I use some cute tricks to find the first image in the text, etc.
Anyways, if your question is "can I access the code saved in github"? The answer is yes, for sure!
I can even add a little section on how to do it because it is not 100% clear. (It took me some time to find it)
Otherwise, you may have a more complicated question, but if you clarify it, I can surely try to help!
from gatsby-source-github-api.
further comment for anybody who sees this:
query {
user( login: "ldd") {
repositories(first: 11){
edges {
node {
readme: object(expression:"master:package.json"){
... on Blob{
text
}
}
}
}
}
}
}
That'll get you the package.json contents for some of my repositories.
Sources: https://stackoverflow.com/questions/44137710/github-graphql-equivalent-of-the-contents-api
from gatsby-source-github-api.
Related Issues (15)
- Media files for this repository
- Warning during node transformation when using gatsby-transformer-json HOT 2
- cannot query languages HOT 1
- GitHub Url Docs HOT 2
- Errors handling HOT 3
- Unknown type "Blob" HOT 12
- Cant get gatsby-source-github-api to load properly HOT 5
- Getting contributors on each repostirory? HOT 3
- Gatsby v3.x compatibility HOT 5
- Breaks on Gatsby v3 because npm package needs published with new version HOT 2
- Cannot use variables in certain queries HOT 2
- Multiple queries HOT 2
- Multiple queries? HOT 1
- Using this with markdown remark HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-github-api.