-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-node.js
37 lines (33 loc) · 1.41 KB
/
gatsby-node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
const typeDefs = `
type ContentfulLandingPage implements ContentfulReference & ContentfulEntry & Node @dontInfer {
name: String
slug: String
noIndex: Boolean
title: String
description: String
image: ContentfulAsset @link(by: "id", from: "image___NODE")
sections: [ContentfulLandingPageSection] @link(by: "id", from: "sections___NODE")
}
type ContentfulLandingPageSection implements ContentfulReference & ContentfulEntry & Node @dontInfer {
name: String
component: String
heading: String
content: [ContentfulLandingPageContent] @link(by: "id", from: "content___NODE")
secondaryHeading: String
}
type ContentfulLandingPageContent implements ContentfulReference & ContentfulEntry & Node @dontInfer {
name: String
image: ContentfulAsset @link(by: "id", from: "image___NODE")
links: [ContentfulLink] @link(by: "id", from: "links___NODE")
primaryText: contentfulLandingPageContentPrimaryTextTextNode @link(by: "id", from: "primaryText___NODE")
secondaryText: contentfulLandingPageContentSecondaryTextTextNode @link(by: "id", from: "secondaryText___NODE")
}
type ContentfulLink implements ContentfulReference & ContentfulEntry & Node @dontInfer {
href: String
text: String
}
`;
createTypes(typeDefs);
};