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

fix(gatsby-plugin-mdx): set childOf extension for Mdx type definition #25112

Merged
merged 3 commits into from Jun 27, 2020

Conversation

tesseralis
Copy link
Contributor

Description

Add the childOf extension to the Mdx node type to aid in populating types.

This is equivalent to:

type Mdx implements Node @childOf(mimeTypes: ["text/markdown", "text/x-markdown"]) {
  # (or whatever is defined in `options.mediaTypes`
}

Motivation

This makes the typing more robust so that anything with @mimeTypes(types: ["text/markdown", "text/x-markdown"]) immediately get childMdx even if no nodes are created.

@tesseralis tesseralis requested a review from a team as a code owner June 19, 2020 01:46
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 19, 2020
@tesseralis tesseralis requested a review from pieh June 19, 2020 02:02
@laurieontech laurieontech added topic: MDX and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 19, 2020
@laurieontech laurieontech requested a review from johno June 19, 2020 12:21
@danabrit danabrit assigned johno and laurieontech and unassigned freiksenet Jun 23, 2020
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@tesseralis tesseralis merged commit 49c0929 into master Jun 27, 2020
@delete-merged-branch delete-merged-branch bot deleted the gatsby-plugin-mdx/mime-types branch June 27, 2020 00:40
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

5 participants