-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Webpack error querying mdx.html in GraphiQL #35771
Comments
Hi! The One could add this limitation to this section: https://www.gatsbyjs.com/plugins/gatsby-plugin-mdx/#troubleshooting |
Thanks for the quick response! I'd be happy to help change the docs. Could you help me what the |
I'm not 100% sure why that limitation exists and if we can warn against it, this is a bit before my time but I can check if I can get more infos on this. It's defined here: gatsby/packages/gatsby-plugin-mdx/gatsby/create-schema-customization.js Lines 219 to 243 in 160bbf0
When you use it in e.g. your page/template, we already warn about it. But not inside GraphiQL. Adding directly a warning would be really good, but the minimum thing we can do is to add it to the docs for now. Sidenote: With #35650 this might already change again, but that shouldn't be a concern for now. |
Solution: change html on body 👇 query MyQuery {
mdx {
- html
+ body
}
} And using it in code: import { MDXRenderer } from "gatsby-plugin-mdx";
... some code ...
<MDXRenderer>{data.body}</MDXRenderer> |
Would it be possible to add a note about this to the official Gatsby tutorial? I just ran into this while going through it for the first time. |
I'll take a look at the docs for this this week and get in a PR. |
Looking at updating https://www.gatsbyjs.com/docs/mdx/writing-pages/ and maybe https://www.gatsbyjs.com/docs/mdx/getting-started/
@lizzieshipwreck where did you run into this problem (could I get a link?) |
@nodebotanist I think it's can be not actual in near future, because MDX plugin will get major update: #25068 |
Hi! We merged #35650 which means that a new major version of In this new version there will no longer be a |
Preliminary Checks
Description
Trying to query the field
mdx.html
from GraphiQL loads forever on the web interface and gives an error in the console runninggatsby develop
.Query:
Console error:
Despite the environment below, this occurred in Firefox 100.0
Reproduction Link
https://github.com/notexactlyawe/mdx-bug-repro
Steps to Reproduce
gatsby develop
http://localhost:8000/___graphq
Expected Result
A GraphQL response for the query would be given.
Actual Result
GraphiQL shows a loading spinner and the
gatsby develop
output shows an error.Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: