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

Setting blog options to false breaks a generated site #30

Open
sarahmonster opened this issue Dec 29, 2019 · 0 comments
Open

Setting blog options to false breaks a generated site #30

sarahmonster opened this issue Dec 29, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sarahmonster
Copy link
Member

If you set enableBlogAuthors or enableBlogTags to false in your SiteConfig, Gatsby freaks out:

 ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Field "authors" must not have a selection since type "[String]" has no subfields.

GraphQL request:11:23
10 |             fields {
11 |               authors {
   |                       ^
12 |                 id,Field "tags" must not have a selection since type "[String]" has no subfields.

GraphQL request:21:20
20 |               title
21 |               tags {
   |                    ^
22 |                 id

failed createPages - 0.072s
success createPagesStatefully - 0.035s
success onPreExtractQueries - 0.003s
success update schema - 0.022s

 ERROR #85909  GRAPHQL

Field "tags" must not have a selection since type "[String]" has no subfields

File: src/templates/Blog/index.js:87:18

Looks like the queries may need to be adjusted to account for these settings.

As a sidenote, I'm okay with not allowing people to remove tags and authors from the blog, since this is probably rare—most people who want a blog would be likely to want certainly tags, but possibly authors as well. And having authors in a set file, even if there's only a single author, makes it more straightforward to show an author bio box or similar.

See also #25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants