This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.1 | |
backend: | |
phases: | |
build: | |
commands: | |
- '# Get Amplify CLI Cloud-Formation stack info from environment cache' | |
- export STACKINFO="$(envCache --get stackInfo)" | |
- '# Execute Amplify CLI with the helper script' | |
- amplifyPush --environment $BUILD_ENV | |
- '# Store Amplify CLI Cloud-Formation stack info in environment cache' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import Amplify, { graphqlOperation } from "aws-amplify"; | |
import { withAuthenticator, Connect } from "aws-amplify-react"; | |
import "./App.css"; | |
import awsConfig from "./aws-exports"; | |
import * as mutations from "./graphql/mutations"; | |
import * as queries from "./graphql/queries"; | |
import * as subscriptions from "./graphql/subscriptions"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import Amplify from 'aws-amplify'; | |
import awsConfig from './aws-exports'; | |
import { withAuthenticator } from 'aws-amplify-react'; | |
Amplify.configure(awsConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.onCreatePage = async ({ page, actions }) => { | |
const { createPage } = actions | |
if (page.path.match(/^\/dashboard/)) { | |
page.matchPath = "/dashboard/*" | |
createPage(page) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Layout from '../components/Layout' | |
const Dashboard = props => ( | |
<Layout {...props} title="Gatsby Starter Blog"> | |
<h1>Liked Posts</h1> | |
</Layout> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Amplify, { Auth } from 'aws-amplify' | |
import awsConfig from './src/aws-exports' | |
Amplify.configure(awsConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { withAuthenticator } from 'aws-amplify-react' | |
import Layout from '../components/Layout' | |
const Dashboard = props => ( | |
<Layout {...props} title="Gatsby Starter Blog" isDashboard> | |
<h1>Liked Posts</h1> | |
</Layout> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
return ( | |
<div | |
style={{ | |
marginLeft: `auto`, | |
marginRight: `auto`, | |
maxWidth: rhythm(24), | |
padding: `${rhythm(1.5)} ${rhythm(3 / 4)}`, | |
}} | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PostLike @model @auth(rules: [{ allow: owner, ownerField: "userId" }]) { | |
id: ID! | |
userId: String! | |
postId: String! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { graphql, Link } from 'gatsby' | |
import { withAuthenticator, Connect } from 'aws-amplify-react' | |
import { graphqlOperation } from 'aws-amplify' | |
import Layout from '../components/Layout' | |
import { listPostLikes } from '../graphql/queries' | |
const Dashboard = props => ( | |
<Layout {...props} title="Gatsby Starter Blog" isDashboard> |