How can I get all the markdown field to GraphQL node field?
See original GitHub issueSummary
I use @gridsome/source-filesystem
and @gridsome/transformer-remark
to grab field data to GraphQL for use. Is it possible if I can get custom field from markdown file to GraphQL?
Basic example
I have a custom named desc
field in my .md
file.
// a blog post md file
---
title: this is a blog
desc: this is descripton
---
This is a blog post
How can i config to fetch it successfully from query?
<page-query>
query Posts ($page: Int) {
allPost (page: $page) {
edges {
node {
title
desc
}
}
}
}
</page-query>
Include a basic example or links here.
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
Because we may use custom field to define additional categories.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Customizing the GraphQL Schema - Gatsby
Every markdown post file is hereby transformed into a “node” object in the ... GraphQL schema with the Node interface, which describes the...
Read more >How to use createResovers to convert a Markdown FIELD (not ...
You can find out the type name in GraphiQL by clicking on the field name in the left column, or holding cmd and...
Read more >How to create a text/markdown node to process content using ...
In this post, We will show you how you can consume markdown content ... Using createNodeField function to create a new field on...
Read more >Gatsby Graphql schema customization for beginners
You can fetch data from CMS using Graphql, query images, query markdown based content with a help of a variety of plugins. It's...
Read more >Advanced GraphQL Usage In Gatsby Websites
markdown into a node with all the fields of remark for rendering markdown as HTML. Lastly, we included plugins in operating on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@namoda378 I did not understand your solution
I also need a similar solution…
@freshyill I reverted to 0.2.1 for the time being and this worked to allow for custom fields. Hope that helps!