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

Generate component documentation from GraphQL instead of runtime #1078

Merged
merged 49 commits into from
Jan 28, 2021

Conversation

jerelmiller
Copy link
Contributor

@jerelmiller jerelmiller commented Jan 28, 2021

Relates to #1077

Description

Generates the New Relic One SDK documentation from the data in GraphQL rather than at runtime. This should help out our SEO tremendously for those pages. This PR also auto generates pages for each component/api in the SDK so that we no longer have to manually create MDX files for each component.

Screenshots

Before

developer newrelic com_components_button

After

localhost_8000_components_button

@@ -179,4 +256,211 @@ PropList.propTypes = {
),
};

export const query = graphql`
fragment PropList_propTypes on NewRelicSdkPropTypeDefinition {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't ask. This query was so hard 😂

Copy link
Contributor

Choose a reason for hiding this comment

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

I remember trying to write prop types for the prop prop types and getting so turned around 😵

Copy link
Contributor

@zstix zstix left a comment

Choose a reason for hiding this comment

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

🎉 This looks fantastic! Thank you so much for digging into this!

@jerelmiller
Copy link
Contributor Author

You're welcome! This was fun :)

@jerelmiller jerelmiller merged commit c7c6b11 into develop Jan 28, 2021
@jerelmiller jerelmiller deleted the jerel/use-nr-sdk-data branch January 28, 2021 22:35
@nr-opensource-bot
Copy link
Contributor

🎉 This PR is included in version 1.34.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants