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

Docs Error: Tutorial Part 6 #5571

Closed
dominictwlee opened this issue May 27, 2018 · 2 comments
Closed

Docs Error: Tutorial Part 6 #5571

dominictwlee opened this issue May 27, 2018 · 2 comments

Comments

@dominictwlee
Copy link

I'm just going through gatsby tutorials right now (absolutely amazing btw, probably one of the most intuitive static site generators I've used) and I think there might be a slight error in one of the snippets used in part six of the tutorial.

In this snippet:
gatsby-docs-tutorial-6

Looking through the schema in GraphiQL, it only takes a string I don't believe date can take the argument formatString, and thus will throw an error.

I'm happy to do a pull request and amend it if that's the case. If not, sorry for being completely ignorant!

@pieh
Copy link
Contributor

pieh commented May 27, 2018

Date type fields DO have formatString argument (we even use it in gatsbyjs.org site - https://github.com/gatsbyjs/gatsby/blob/master/www/src/templates/template-blog-post.js#L310 ) - if you don't have it, it means gatsby didn't recognize that field as date type - which would mean you probably used not supported date format in your frontmatter (i mean value - field name doesn't matter here). Here's list of supported formats: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/types/type-date.js#L11-L41

@pieh pieh closed this as completed May 27, 2018
@dominictwlee
Copy link
Author

@pieh Thanks for clarifying that for me.

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

No branches or pull requests

2 participants