Skip to content

Commit 97c2638

Browse files
authored
chore: update GraphCMS references (#42)
1 parent f4166fd commit 97c2638

19 files changed

+317
-102
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ node_modules
1111
# Logs
1212
npm-debug.log*
1313
yarn-debug.log*
14-
yarn-error.log*
14+
yarn-error.log*
15+
.vercel

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# gatsby-starter-graphcms-blog
1+
# gatsby-starter-hygraph-blog
22

3-
> A [Gatsby](httsp://gatsbyjs.com) starter for creating a basic blog with [GraphCMS](https://graphcms.com)
3+
> A [Gatsby](httsp://gatsbyjs.com) starter for creating a basic blog with [Hygraph](https://hygraph.com)
44
5-
[Demo](https://gatsby-starter-graphcms-blog.vercel.app)[`gatsby-source-graphcms`](https://github.com/GraphCMS/gatsby-source-graphcms)
5+
[Demo](blog.withheadlesscms.com)[`gatsby-source-hygraph`](https://github.com/Hygraph/gatsby-source-hygraph)
66

7-
[![Clone project](https://graphcms.com/button)](https://app.graphcms.com/clone/a1cd264ab6d3448d9b4d1e2cc2162620?name=Blog)
7+
[![Clone project](https://hygraph.com/button)](https://app.graphcms.com/clone/a1cd264ab6d3448d9b4d1e2cc2162620?name=Blog)
88
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FGraphCMS%2Fgatsby-starter-graphcms-blog&env=GRAPHCMS_ENDPOINT,GRAPHCMS_TOKEN&envDescription=GraphCMS%20API%20Endpoint%20and%20Token&envLink=https%3A%2F%2Fgithub.com%2FGraphCMS%2Fgatsby-starter-graphcms-blog%23quick-start&project-name=graphcms-blog&repo-name=graphcms-blog&demo-title=GraphCMS%20Blog&demo-description=Gatsby%20starter%20for%20creating%20a%20basic%20blog%20with%20GraphCMS&demo-url=https%3A%2F%2Fblog.withheadlesscms.com%2F&demo-image=https%3A%2F%2Frepository-images.githubusercontent.com%2F283171327%2F1dc64780-e3de-11ea-9661-8f89688dc13c)
99

1010
## Quick start
1111

1212
1. **Create a new Gatsby project via the [Gatsby CLI](https://www.npmjs.com/package/gatsby-cli)**
1313

1414
```shell
15-
gatsby new graphcms-blog https://github.com/GraphCMS/gatsby-starter-graphcms-blog
15+
gatsby new hygraph-blog https://github.com/Hygraph/gatsby-starter-hygraph-blog
1616
```
1717

18-
2. **Provide your GraphCMS project keys**
18+
2. **Provide your Hygraph project keys**
1919

20-
> In order to use this starter, you'll need to have created a new GraphCMS project using our `Blog Template`.
20+
> In order to use this starter, you'll need to have created a new Hygraph project using our `Blog Template`.
2121
2222
Navigate into your new site’s directory and copy the `.env.sample` file.
2323

2424
```shell
25-
cd graphcms-blog
25+
cd hygraph-blog
2626
cp .env.sample .env
2727
```
2828

29-
Inside of your newly created `.env` file, provide values for each variable. These variables can be found in the [project settings UI](https://graphcms.com/docs/guides/concepts/apis#working-with-apis).
29+
Inside of your newly created `.env` file, provide values for each variable. These variables can be found in the [project settings UI](https://hygraph.com/docs/guides/concepts/apis#working-with-apis).
3030

3131
```env
32-
GRAPHCMS_ENDPOINT=""
33-
GRAPHCMS_TOKEN=""
32+
HYGRAPH_ENDPOINT=""
33+
HYGRAPH_TOKEN=""
3434
```
3535

3636
3. **Start building!**
@@ -44,6 +44,6 @@ yarn dev
4444

4545
## Features
4646

47-
- Use [`gatsby-image`](https://www.gatsbyjs.org/packages/gatsby-image) with your GraphCMS image assets.
48-
- MDX support via [`gatsby-plugin-mdx`](https://www.gatsbyjs.org/packages/gatsby-plugin-mdx) on GraphCMS `RichText` fields.
47+
- Use [`gatsby-image`](https://www.gatsbyjs.org/packages/gatsby-image) with your Hygraph image assets.
48+
- MDX support via [`gatsby-plugin-mdx`](https://www.gatsbyjs.org/packages/gatsby-plugin-mdx) on Hygraph `RichText` fields.
4949
- Built with [Tailwind CSS](https://tailwindcss.com/).

gatsby-config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ require('dotenv').config()
22

33
module.exports = {
44
siteMetadata: {
5-
title: 'GraphCMS Blog',
5+
title: 'Hygraph Blog',
66
description:
7-
'Gatsby blog starter for GraphCMS! Powered by `gatsby-source-graphcms`, featuring `gatsby-image` and MDX!',
8-
keywords: 'Headless CMS, GraphCMS, GraphQL CMS, Gatsby',
7+
'Gatsby blog starter for Hygraph! Powered by `gatsby-source-hygraph`, featuring `gatsby-image` and MDX!',
8+
keywords: 'Headless CMS, Hygraph, GraphQL CMS, Gatsby',
99
},
1010
plugins: [
1111
'gatsby-plugin-mdx',
@@ -27,6 +27,7 @@ module.exports = {
2727
token: process.env.GRAPHCMS_TOKEN,
2828
buildMarkdownNodes: true,
2929
downloadLocalImages: true,
30+
fragmentsPath: 'hygraph-fragments',
3031
},
3132
},
3233
'gatsby-transformer-sharp',

graphcms-fragments/Author.graphql

Lines changed: 0 additions & 23 deletions
This file was deleted.

graphcms-fragments/Page.graphql

Lines changed: 0 additions & 24 deletions
This file was deleted.

graphcms-fragments/Asset.graphql renamed to hygraph-fragments/Asset.graphql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ fragment Asset on Asset {
1111
width
1212
size
1313
mimeType
14+
createdBy {
15+
... on User {
16+
remoteTypeName: __typename
17+
remoteId: id
18+
}
19+
}
20+
updatedBy {
21+
... on User {
22+
remoteTypeName: __typename
23+
remoteId: id
24+
}
25+
}
26+
publishedBy {
27+
... on User {
28+
remoteTypeName: __typename
29+
remoteId: id
30+
}
31+
}
1432
coverImagePost {
1533
... on Post {
1634
remoteTypeName: __typename
@@ -29,5 +47,11 @@ fragment Asset on Asset {
2947
remoteId: id
3048
}
3149
}
50+
scheduledIn {
51+
... on ScheduledOperation {
52+
remoteTypeName: __typename
53+
remoteId: id
54+
}
55+
}
3256
url
3357
}

hygraph-fragments/Author.graphql

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
fragment Author on Author {
2+
stage
3+
remoteId: id
4+
createdAt
5+
updatedAt
6+
publishedAt
7+
name
8+
title
9+
biography
10+
createdBy {
11+
... on User {
12+
remoteTypeName: __typename
13+
remoteId: id
14+
}
15+
}
16+
updatedBy {
17+
... on User {
18+
remoteTypeName: __typename
19+
remoteId: id
20+
}
21+
}
22+
publishedBy {
23+
... on User {
24+
remoteTypeName: __typename
25+
remoteId: id
26+
}
27+
}
28+
picture {
29+
... on Asset {
30+
remoteTypeName: __typename
31+
remoteId: id
32+
locale
33+
}
34+
}
35+
posts {
36+
... on Post {
37+
remoteTypeName: __typename
38+
remoteId: id
39+
}
40+
}
41+
scheduledIn {
42+
... on ScheduledOperation {
43+
remoteTypeName: __typename
44+
remoteId: id
45+
}
46+
}
47+
}

hygraph-fragments/Page.graphql

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
fragment Page on Page {
2+
stage
3+
remoteId: id
4+
createdAt
5+
updatedAt
6+
publishedAt
7+
title
8+
slug
9+
subtitle
10+
content {
11+
... on RichText {
12+
raw
13+
html
14+
markdown
15+
text
16+
}
17+
}
18+
createdBy {
19+
... on User {
20+
remoteTypeName: __typename
21+
remoteId: id
22+
}
23+
}
24+
updatedBy {
25+
... on User {
26+
remoteTypeName: __typename
27+
remoteId: id
28+
}
29+
}
30+
publishedBy {
31+
... on User {
32+
remoteTypeName: __typename
33+
remoteId: id
34+
}
35+
}
36+
scheduledIn {
37+
... on ScheduledOperation {
38+
remoteTypeName: __typename
39+
remoteId: id
40+
}
41+
}
42+
seo {
43+
... on Seo {
44+
remoteTypeName: __typename
45+
remoteId: id
46+
}
47+
}
48+
}

graphcms-fragments/Post.graphql renamed to hygraph-fragments/Post.graphql

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ fragment Post on Post {
88
slug
99
date
1010
excerpt
11-
coverImage {
12-
... on Asset {
13-
remoteTypeName: __typename
14-
remoteId: id
15-
locale
16-
}
17-
}
1811
content {
1912
... on RichText {
2013
raw
@@ -24,12 +17,43 @@ fragment Post on Post {
2417
}
2518
}
2619
tags
20+
createdBy {
21+
... on User {
22+
remoteTypeName: __typename
23+
remoteId: id
24+
}
25+
}
26+
updatedBy {
27+
... on User {
28+
remoteTypeName: __typename
29+
remoteId: id
30+
}
31+
}
32+
publishedBy {
33+
... on User {
34+
remoteTypeName: __typename
35+
remoteId: id
36+
}
37+
}
38+
coverImage {
39+
... on Asset {
40+
remoteTypeName: __typename
41+
remoteId: id
42+
locale
43+
}
44+
}
2745
author {
2846
... on Author {
2947
remoteTypeName: __typename
3048
remoteId: id
3149
}
3250
}
51+
scheduledIn {
52+
... on ScheduledOperation {
53+
remoteTypeName: __typename
54+
remoteId: id
55+
}
56+
}
3357
seo {
3458
... on Seo {
3559
remoteTypeName: __typename
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
fragment ScheduledOperation on ScheduledOperation {
2+
stage
3+
remoteId: id
4+
createdAt
5+
updatedAt
6+
publishedAt
7+
description
8+
errorMessage
9+
rawPayload
10+
createdBy {
11+
... on User {
12+
remoteTypeName: __typename
13+
remoteId: id
14+
}
15+
}
16+
updatedBy {
17+
... on User {
18+
remoteTypeName: __typename
19+
remoteId: id
20+
}
21+
}
22+
publishedBy {
23+
... on User {
24+
remoteTypeName: __typename
25+
remoteId: id
26+
}
27+
}
28+
release {
29+
... on ScheduledRelease {
30+
remoteTypeName: __typename
31+
remoteId: id
32+
}
33+
}
34+
status
35+
affectedDocuments {
36+
... on Asset {
37+
remoteTypeName: __typename
38+
remoteId: id
39+
locale
40+
}
41+
... on Author {
42+
remoteTypeName: __typename
43+
remoteId: id
44+
}
45+
... on Page {
46+
remoteTypeName: __typename
47+
remoteId: id
48+
}
49+
... on Post {
50+
remoteTypeName: __typename
51+
remoteId: id
52+
}
53+
... on Seo {
54+
remoteTypeName: __typename
55+
remoteId: id
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)