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

Documentation Headles CMS and Gatsby with error #23

Open
mativiscusso opened this issue Aug 29, 2020 · 0 comments
Open

Documentation Headles CMS and Gatsby with error #23

mativiscusso opened this issue Aug 29, 2020 · 0 comments
Assignees

Comments

@mativiscusso
Copy link

This is:

  • Bug

Specifications

  • version:
  • OS: Windows 10 64bits
  • Browser: Chrome - Firefox

Expected Behavior

Actual Behavior

The expected behavior is that the guide to build the blog with gatsby and headless cms works and does not throw an error in the rendering

Steps to Reproduce the Problem

  1. I generate the API models
  2. I install graphql plugin in gatsby and put my access token
    3.I paste the code as it appears in the documentation and when running the compilation it throws an error

Detailed Description

The result of the query in the body field cannot be rendered since it is a JSON format.
// We render a nice list of blog posts const BlogPosts = blogPosts.map(post => ( <div key={post-${post.id}}> <h1>{post.title}</h1> <p style={{whiteSpace: "pre-wrap"}}>{post.body}</p> </div> ))
This is the error it throws in the browser when run command gatsby develop

Objects are not valid as a React child (found: object with keys {type, children}).

Possible Solution

@Ashu96 Ashu96 self-assigned this Aug 31, 2020
@Pavel910 Pavel910 transferred this issue from webiny/webiny-js Aug 31, 2020
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

No branches or pull requests

2 participants