Skip to content

Commit

Permalink
docs: make example more clear that it is contained within a react com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
sherwinski authored and sherwinski committed Jan 31, 2022
1 parent 8fc44e1 commit 8b564b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ returns something similar to:
**Note**: Certain fields under `attributes` are returned as strings to provide better [resiliency](https://forums.fauna.com/t/how-to-store-arbitrary-json-object-via-graphql/142/3) when used with GraphQL. Therefore, these fields (`custom_fields`, `tags`, `colors.dominant_colors`) will need to be parsed back into JSON objects after being queried. The example below demonstrates how to do this:

```js
{
data.allContentfulArticle.edges.map(({ node }) => (
export default function Page({ data }) {
return data.allContentfulArticle.edges.map(({ node }) => (
<div className="p-4 lg:w-1/3 md:w-1/2 sm:w-full">
<ImgixGatsbyImage
src={node.bannerImage.src}
Expand Down

0 comments on commit 8b564b2

Please sign in to comment.