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

'File' Node Type conflict fix #45

Merged
merged 3 commits into from May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -30,7 +30,7 @@ You can query nodes created from Plone like the following:

```graphql
{
allNewsItem {
allPloneNewsItem {
edges {
node {
title
Expand Down
2 changes: 1 addition & 1 deletion src/gatsby-node.js
Expand Up @@ -33,7 +33,7 @@ exports.sourceNodes = async (
let node = {
...item,
internal: {
type: item['@type'].replace(' ', ''),
type: `Plone${item['@type'].replace(' ', '')}`,
contentDigest: createContentDigest(item),
mediaType: 'text/html',
},
Expand Down
4 changes: 2 additions & 2 deletions tests/gatsby-starter-default/src/pages/index.js
Expand Up @@ -3,7 +3,7 @@ import Link from 'gatsby-link';

const IndexPage = ({ data }) => (
<div>
{data.allDocument.edges.map(({ node }) => (
{data.allPloneDocument.edges.map(({ node }) => (
<div>
<h3>{node.title}</h3>
<h4>{node.description}</h4>
Expand All @@ -17,7 +17,7 @@ export default IndexPage;
// Set here the ID of the home page.
export const pageQuery = graphql`
query IndexPageQuery {
allDocument {
allPloneDocument {
edges {
node {
id
Expand Down