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

Correct path + remove unneeded graphql import #46

Merged
merged 1 commit into from Feb 27, 2018

Conversation

KyleAMathews
Copy link
Contributor

Removing passing in path surfaced a bug in the data where one of the paths was missing its forward slash. Gatsby adds to paths if you don't add it but because of the discrepancy, the query now failed because the path in the page object was different than the path in the markdown file.

@KyleAMathews
Copy link
Contributor Author

For this reason and others, I recommend always just using the ID to select things. IDs are guaranteed to be unique across the site.

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

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

Thanks!

@erquhart erquhart merged commit 8e33279 into decaporg:master Feb 27, 2018
This was referenced Feb 27, 2018
@AustinGreen
Copy link
Contributor

Hey Kyle,

Apologies if I'm missing something obvious, but why are the graphql imports unneeded?

@KyleAMathews
Copy link
Contributor Author

The graphql template tags aren't executed at run-time — they're extracted at build-time. We use them the same way as Relay https://facebook.github.io/relay/docs/en/graphql-in-relay.html#graphql

Also, graphql, the npm package is for running backend graphql servers

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.

None yet

3 participants