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

bug(gatsby-transformer-documentationjs): plugin causes error when no documentationJS nodes are found #24592

Closed
tesseralis opened this issue May 28, 2020 · 7 comments
Labels
help wanted Issue with a clear description that the community can help with. stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@tesseralis
Copy link
Contributor

Description

gatsby-transformer-documentationjs fails when no documentation nodes are defined.

Steps to reproduce

  1. create a project that uses the gatsby-transformer-documentationjs plugin
  2. do not source any JS files
  3. have a page/static query that calls documentationJS, eg:
allDocumenationJS {
  nodes {
    description {
      id
    }
  }
}

Expected result

The allDocumentationJS query returns an empty array

Actual result

Build fails with Type with name "DocumentationJSComponentDescription" does not exists

Proposed solution

Add a type DocumentationJSComponentDescription with the appropriate fields to the gatsby-node of the plugin: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-documentationjs/src/gatsby-node.js#L47

Environment

N/A

@tesseralis tesseralis added type: bug An issue or pull request relating to a bug in Gatsby help wanted Issue with a clear description that the community can help with. labels May 28, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 28, 2020
@tesseralis tesseralis changed the title bug (gatsby-transformer-documentationjs) plugin causes error when no documentationJS nodes are found bug(gatsby-transformer-documentationjs): plugin causes error when no documentationJS nodes are found May 28, 2020
@pieh pieh added status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 29, 2020
@luisFilipePT
Copy link
Contributor

@tesseralis I think you have a typo allDocumenationJS instead of allDocumentationJs just to avoid people copy pasting and having a different bug ;)

@attaradev
Copy link

Is anyone working on this?

@attaradev
Copy link

@tesseralis can I work on it?

@tesseralis
Copy link
Contributor Author

@mikeattara are you still interested in working on this?

@attaradev
Copy link

@tesseralis yes

@github-actions
Copy link

github-actions bot commented Jul 1, 2020

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jul 1, 2020
@github-actions
Copy link

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants