Skip to content

Conversation

@fusepilot
Copy link
Contributor

Addresses #2685.

It looks like there was an attempt to fix this problem before judging by these lines:

// Update Schema for SitePage.
activity = report.activityTimer(`update schema`)
activity.start()
await require(`../schema`)()
activity.end()

This PR simply moves that second require('../schema')() call to before onPreExtractQueries. And that seems to fix it.

Of course, I tried this after attempting to update the old schema in this branch. So thats started in case I've missed something and we need that in between "SitePage schema only" update.

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 8039e1b

https://deploy-preview-2710--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Hmm this makes SitePage queries work for you?

Yeah, probably we should just go with this and then do a slimmer schema update in the future so we're not recalculating everything.

@fusepilot
Copy link
Contributor Author

This fixes the error message I was getting in #2685. And the allSitePage query I was testing against:

query IndexQuery {
    allSitePage {
      edges {
        node {
          fields {
            foo
          }
        }
      }
    }
  }

Is there another problem with SitePage queries that you were hoping to fix?

@KyleAMathews
Copy link
Contributor

Nope! Let's try this out.

@KyleAMathews KyleAMathews merged commit 2d59c31 into gatsbyjs:master Nov 1, 2017
KyleAMathews pushed a commit that referenced this pull request Nov 1, 2017
KyleAMathews added a commit that referenced this pull request Nov 1, 2017
* WIP gatsby-source-drupal v2

* Tweaks to site

* Add relationship + back reference links

* Fetch all items in a collection

* Download files

* WIP

* Fiddle with design

* Add recipe + recipes pages

* Don't show backup font for title for a while

* Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Add RelayParser to convertASTDocuments call (#2736)

* move second schema update earlier (#2710)

* Publish

 - [email protected]
 - [email protected]
 - [email protected]

* Update adding-markdown-pages.md (#2728)

* Update adding-tags-and-categories-to-blog-posts.md (#2729)

* Update coming-from-react-to-gatsby (#2730)

* Update creating-dynamically-rendered-navigation.md (#2731)

* Update dropping-images-into-static-folders.md (#2732)

* Update how-gatsby-works-with-github-pages.md (#2733)

* Update how-to-add-a-list-of-markdown-blog-posts (#2734)

* Styling tweaks

* Remove old/debugging code

* Switch back to using presentationWidth since that was fixed

* Back out temp changes to transformer-json that fixed in other PR
@jlengstorf
Copy link
Contributor

Hiya @fusepilot! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

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. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

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