Skip to content
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

Rewrite of gatsby-source-contentful query section #7533

Merged
merged 5 commits into from
Dec 10, 2018
Merged

Rewrite of gatsby-source-contentful query section #7533

merged 5 commits into from
Dec 10, 2018

Conversation

jserrao
Copy link
Contributor

@jserrao jserrao commented Aug 22, 2018

I cleaned up the queries part of the documentation (at the request of Kyle: #3205 (comment)) to better reflect how this works in the wild.

I could use a check on spelling, grammar and content.

Hope it helps, Gatsby is an excellent project.

```
export const assetQuery = graphql`
query myAssetQuery {
contentfulAsset {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd want to add some sort of filter here — otherwise what asset this query returns is kinda random.

@KyleAMathews KyleAMathews force-pushed the master branch 5 times, most recently from fc4ca3e to 2116fff Compare September 17, 2018 20:36
* master: (1421 commits)
  feat(gatsby-image): add onStartLoad prop  (#6702)
  fix(docs): add Ecosystem to docs sidebar, consistency with tutorial sidebar (#10350)
  fix(www): Starters.yaml housekeeping (#10354)
  docs: add ttag starter (#10352)
  docs: document branching (#9983)
  plugin checker initial commit (#7062)
  docs: new starter features is required (#10353)
  docs: migrated line highlighting to highlight-line, highlight-start, highlight-end (#10202)
  Add Birra Napoli to site showcase (#10344)
  Add BetterDocs to site showcase (#10349)
  chore(release): Publish
  Add option to keep metadata in files processed by `gatsby-plugin-sharp` (#10210)
  fix(gatsby): [loki] sync db autosaves (#10212)
  Add Ad Hoc Homework to sites.yml (#10346)
  fix(graphql-skip-limit): declare `graphql` peer dependency (#10305)
  fix(gatsby-plugin-offline): gracefully degrade if appshell isn't precached (#10329)
  Service workers note (#10276)
  fix(docs): link fixes, podcast addition (#10332)
  feat(docs): Create clearer pathways in docs (#9898)
  feat(www): Rename community section to creators (#10312)
  ...
Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great extra info to have @jserrao, thanks 👍

I've fixed up the merge conflicts and made a round of edits to your initial version.

Tagging @gatsbyjs/docs for review, although as this PR has been around for a while I'll probably merge it once the tests are green.

I feel like the How to query for Asset nodes and How to query for ContentType nodes are largely duplicated content so could be combined into one section. But that's something that could be done in a follow up PR?

@jserrao
Copy link
Contributor Author

jserrao commented Dec 10, 2018

@m-allanson - thanks, glad it was helpful. Not sure what tests I was supposed to run to resolve the conflicts - has that changed with Gatsby v2?

I've done more building with Contentful since this was written, I could probably further enhance the docs after this gets into core.

@m-allanson
Copy link
Contributor

The failing tests seem to have been a temporary problem. I pushed up some more changes and they've all passed now.

@m-allanson
Copy link
Contributor

I also took a run at condensing the content without removing any of the info. Merging now - thanks for your patience!

Also cc @gatsbyjs/docs in case you want to make any edits to this.

@m-allanson m-allanson merged commit 7609e9e into gatsbyjs:master Dec 10, 2018
@gatsbot
Copy link

gatsbot bot commented Dec 10, 2018

Holy buckets, @jserrao — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (Currently we’ve got a couple t-shirts available, plus some socks that are really razzing our berries right now.)
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

m-allanson added a commit to Bouncey/gatsby that referenced this pull request Dec 10, 2018
* master: (35 commits)
  feat(gatsby-source-filesystem): keep original name of remote files (gatsbyjs#9777)
  docs(gatsby-source-contentful): Rewrite of gatsby-source-contentful query section (gatsbyjs#7533)
  Update "Deploying with Now" Guide (gatsbyjs#10390)
  Add Matomo to list of analytics plugins (gatsbyjs#10372)
  Add satispay.com to showcase (gatsbyjs#10380)
  Adds @goblindegook/gatsby-starter-typescript (gatsbyjs#10377)
  Fix typo in gatsby-remark-code-repls sample `gatsby-config.json` in README (gatsbyjs#10361)
  fix(gatsby): fix false type conflict warning on plugin fields (gatsbyjs#10355)
  fix(docs): Just a small typo fix in the docs (gatsbyjs#10359)
  feat(gatsby-image): add onStartLoad prop  (gatsbyjs#6702)
  fix(docs): add Ecosystem to docs sidebar, consistency with tutorial sidebar (gatsbyjs#10350)
  fix(www): Starters.yaml housekeeping (gatsbyjs#10354)
  docs: add ttag starter (gatsbyjs#10352)
  docs: document branching (gatsbyjs#9983)
  plugin checker initial commit (gatsbyjs#7062)
  docs: new starter features is required (gatsbyjs#10353)
  docs: migrated line highlighting to highlight-line, highlight-start, highlight-end (gatsbyjs#10202)
  Add Birra Napoli to site showcase (gatsbyjs#10344)
  Add BetterDocs to site showcase (gatsbyjs#10349)
  chore(release): Publish
  ...
@shannonbux
Copy link
Contributor

Thanks @jserrao and @m-allanson! Not sure how this got lost in the mix and many thanks for these edits! Looks great!

m-allanson added a commit to markza/gatsby that referenced this pull request Dec 11, 2018
* master: (1432 commits)
  chore(release): Publish
  Fix Starter Library URL and update copy (gatsbyjs#10368)
  feat(gatsby-source-filesystem): keep original name of remote files (gatsbyjs#9777)
  docs(gatsby-source-contentful): Rewrite of gatsby-source-contentful query section (gatsbyjs#7533)
  Update "Deploying with Now" Guide (gatsbyjs#10390)
  Add Matomo to list of analytics plugins (gatsbyjs#10372)
  Add satispay.com to showcase (gatsbyjs#10380)
  Adds @goblindegook/gatsby-starter-typescript (gatsbyjs#10377)
  Fix typo in gatsby-remark-code-repls sample `gatsby-config.json` in README (gatsbyjs#10361)
  fix(gatsby): fix false type conflict warning on plugin fields (gatsbyjs#10355)
  fix(docs): Just a small typo fix in the docs (gatsbyjs#10359)
  feat(gatsby-image): add onStartLoad prop  (gatsbyjs#6702)
  fix(docs): add Ecosystem to docs sidebar, consistency with tutorial sidebar (gatsbyjs#10350)
  fix(www): Starters.yaml housekeeping (gatsbyjs#10354)
  docs: add ttag starter (gatsbyjs#10352)
  docs: document branching (gatsbyjs#9983)
  plugin checker initial commit (gatsbyjs#7062)
  docs: new starter features is required (gatsbyjs#10353)
  docs: migrated line highlighting to highlight-line, highlight-start, highlight-end (gatsbyjs#10202)
  Add Birra Napoli to site showcase (gatsbyjs#10344)
  ...
@jserrao
Copy link
Contributor Author

jserrao commented Dec 11, 2018

@shannonbux - thanks. Happy to help out some more. Good docs are the number one determinant if I'm going to use a tool. If there is a docs group within the maintainers, I'd be happy to take some tasks and improve things. Maybe you have a PM tool where you track what needs help?

@m-allanson
Copy link
Contributor

m-allanson commented Dec 11, 2018

Hey @jserrao ❤️❤️❤️ for more docs contributions.

Issues with the type: documentation label are a good place to start, and you can get an overall idea of where Gatsby's docs are heading from docs issues with the "Epic" label.

Gatsby uses ZenHub to organise the Epic issues which acts as a layer on top of GitHub. It's helpful, but not essential to contributing docs.

There's also a guide to contributing docs. You can ping @gatsbyjs/docs if you have any specific questions related to docs - we're all very happy to help 🙏

@jserrao
Copy link
Contributor Author

jserrao commented Dec 11, 2018

@m-allanson - ok, great. I've got some time coming up with the holiday break, I'll see where I can be useful.

@KyleAMathews
Copy link
Contributor

Thanks @jserrao!

@shannonbux
Copy link
Contributor

Yes, thanks @jserrao and ditto to everything @m-allanson said!

m-allanson added a commit to alexkirsz/gatsby that referenced this pull request Dec 12, 2018
* master: (1425 commits)
  showcase: Add TMDb Gatsby site (gatsbyjs#10411)
  chore(www): bump offline plugin version (gatsbyjs#10409)
  chore(release): Publish
  Fix Starter Library URL and update copy (gatsbyjs#10368)
  feat(gatsby-source-filesystem): keep original name of remote files (gatsbyjs#9777)
  docs(gatsby-source-contentful): Rewrite of gatsby-source-contentful query section (gatsbyjs#7533)
  Update "Deploying with Now" Guide (gatsbyjs#10390)
  Add Matomo to list of analytics plugins (gatsbyjs#10372)
  Add satispay.com to showcase (gatsbyjs#10380)
  Adds @goblindegook/gatsby-starter-typescript (gatsbyjs#10377)
  Fix typo in gatsby-remark-code-repls sample `gatsby-config.json` in README (gatsbyjs#10361)
  fix(gatsby): fix false type conflict warning on plugin fields (gatsbyjs#10355)
  fix(docs): Just a small typo fix in the docs (gatsbyjs#10359)
  feat(gatsby-image): add onStartLoad prop  (gatsbyjs#6702)
  fix(docs): add Ecosystem to docs sidebar, consistency with tutorial sidebar (gatsbyjs#10350)
  fix(www): Starters.yaml housekeeping (gatsbyjs#10354)
  docs: add ttag starter (gatsbyjs#10352)
  docs: document branching (gatsbyjs#9983)
  plugin checker initial commit (gatsbyjs#7062)
  docs: new starter features is required (gatsbyjs#10353)
  ...
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
…uery section (gatsbyjs#7533)

* Rewrite of gatsby-source-contentful query section

* Re-apply PR changes with a round of edits on top

* Remove duplicate word 'real'

* Reduce some duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants