-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can't use custom fields when using relation widget #9
Comments
@guirreri That error seems to be because Gridsome isn't including your Note that Netlify CMS won't be getting your fields from the Gridsome GraphQL schema -- it'll be getting them from your markdown files directly, so this error shouldn't be affecting things on the Netlify CMS side. |
While this does build (tested here https://github.com/guirreri/gridsome-netlify-cms-issue/commits/fix/blogs-posts-relationship), I get the following warning and when visiting a Blog.vue the
When removing the other Same result when removing the Is there something else I'm missing? I'm not quite sure how each of these |
@guirreri I recommend asking in the Gridsome Discord channel as this bit of the issue isn't related to Netlify CMS or this plugin. I'm closing for now, but if you solve your Gridsome GraphQL issues and see a problem with the plugin integration with Netlify CMS please do reopen! |
Description
It appears that the only way to do a custom, dynamic, many-to-many relationship with Gridsome and Netlify CMS is via the Relation Widget. However, when dynamically populating the relation widget, you can not use any extra custom-created fields in the data - only ID and Title. If any other field is used in the Graph QL query, a build error occurs.
Example Git
https://github.com/guirreri/gridsome-netlify-cms-issue
The project example is meant to show a many-to-many relationship between dynamically Netlify CMS-created Blogs and Posts. i.e. a user can create many Blogs and each Post can be assigned to one or many Blogs.
To Reproduce
yarn install
gridsome develop
When using only
id
andtitle
inBlog.vue
the build works, but after I added theexcerpt
field, which exists in the each of the/blogs/*.md
files, the following build error occurs.The text was updated successfully, but these errors were encountered: