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

feat: Gatsby v4 #218

Merged
merged 19 commits into from
Jan 11, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"imageSize": 100,
"commit": false,
"badgeTemplate": `<img src="https://img.shields.io/badge/all_contributors-1-purple.svg" alt="Contributors" />`,
"badgeTemplate": "<img src=\"https://img.shields.io/badge/all_contributors-1-purple.svg\" alt=\"Contributors\" />",
"contributors": [
{
"login": "ynnoj",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
- name: Install dependencies
run: yarn
- name: Build
Expand Down
1 change: 1 addition & 0 deletions demo/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.15
29 changes: 29 additions & 0 deletions demo/graphcms-fragments/Asset.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,40 @@ fragment Asset on Asset {
width
size
mimeType
createdBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
updatedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
publishedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
productImages {
... on Product {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
scheduledIn {
... on ScheduledOperation {
remoteTypeName: __typename
remoteId: id
stage
}
}
url
Expand Down
29 changes: 29 additions & 0 deletions demo/graphcms-fragments/Category.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,40 @@ fragment Category on Category {
updatedAt(variation: COMBINED)
publishedAt(variation: COMBINED)
name
createdBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
updatedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
publishedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
products {
... on Product {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
scheduledIn {
... on ScheduledOperation {
remoteTypeName: __typename
remoteId: id
stage
}
}
}
53 changes: 52 additions & 1 deletion demo/graphcms-fragments/Product.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,77 @@ fragment Product on Product {
name
slug
description {
... on RichText {
... on ProductDescriptionRichText {
raw
json
html
markdown
text
references {
... on Asset {
remoteTypeName: __typename
remoteId: id
locale
stage
}
... on Category {
remoteTypeName: __typename
remoteId: id
locale
stage
}
... on Product {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
}
}
price
createdBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
updatedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
publishedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
images {
... on Asset {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
categories {
... on Category {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
scheduledIn {
... on ScheduledOperation {
remoteTypeName: __typename
remoteId: id
stage
}
}
}
59 changes: 59 additions & 0 deletions demo/graphcms-fragments/ScheduledOperation.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
fragment ScheduledOperation on ScheduledOperation {
stage
remoteId: id
createdAt
updatedAt
publishedAt
description
errorMessage
rawPayload
createdBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
updatedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
publishedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
release {
... on ScheduledRelease {
remoteTypeName: __typename
remoteId: id
stage
}
}
status
affectedDocuments {
... on Asset {
remoteTypeName: __typename
remoteId: id
locale
stage
}
... on Category {
remoteTypeName: __typename
remoteId: id
locale
stage
}
... on Product {
remoteTypeName: __typename
remoteId: id
locale
stage
}
}
}
42 changes: 42 additions & 0 deletions demo/graphcms-fragments/ScheduledRelease.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
fragment ScheduledRelease on ScheduledRelease {
stage
remoteId: id
createdAt
updatedAt
publishedAt
title
description
errorMessage
isActive
isImplicit
releaseAt
createdBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
updatedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
publishedBy {
... on User {
remoteTypeName: __typename
remoteId: id
stage
}
}
operations {
... on ScheduledOperation {
remoteTypeName: __typename
remoteId: id
stage
}
}
status
}
2 changes: 1 addition & 1 deletion demo/graphcms-fragments/User.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ fragment User on User {
publishedAt
name
picture
kind
isActive
kind
}
19 changes: 10 additions & 9 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@
"build": "gatsby build",
"clean": "gatsby clean",
"preinstall": "cd ../gatsby-source-graphcms && yarn build",
"dev": "gatsby develop"
"dev": "gatsby develop",
"serve": "gatsby serve"
},
"dependencies": {
"@mdx-js/mdx": "1.6.22",
"@mdx-js/react": "1.6.22",
"gatsby": "3.4.1",
"gatsby-plugin-image": "1.4.0",
"gatsby-plugin-mdx": "2.4.0",
"gatsby-plugin-postcss": "4.4.0",
"gatsby-plugin-sharp": "3.4.1",
"gatsby": "4.4.0",
"gatsby-plugin-image": "2.4.0",
"gatsby-plugin-mdx": "3.4.0",
"gatsby-plugin-postcss": "5.4.0",
"gatsby-plugin-sharp": "4.4.0",
"gatsby-source-graphcms": "2.0.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"babel-preset-gatsby": "1.4.0",
"postcss-preset-env": "6.7.0",
"tailwindcss": "1.9.6"
"babel-preset-gatsby": "^2.4.0",
"postcss-preset-env": "7.2.0",
"tailwindcss": "3.0.12"
}
}
5 changes: 4 additions & 1 deletion demo/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
plugins: [require('postcss-preset-env'), require('tailwindcss')],
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
2 changes: 1 addition & 1 deletion demo/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
purge: [
content: [
'./src/components/**/*.js',
'./src/pages/**/*.js',
'./src/templates/**/*.js',
Expand Down
6 changes: 2 additions & 4 deletions gatsby-source-graphcms/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
}
]
],
"plugins": [
"@babel/plugin-transform-runtime"
],
"plugins": ["@babel/plugin-transform-runtime"],
"only": ["src/", "test/"]
}
}
Loading