├── .vscode
└── settings.json
├── public
├── robots.txt
├── favicon.ico
├── logo192.png
├── logo512.png
├── manifest.json
└── index.html
├── .graphqlconfig.yml
├── src
├── index.css
├── App.js
├── components
│ ├── UsersWhoLikedPost.js
│ ├── DeletePost.js
│ ├── commentPost.js
│ ├── CreateCommentPost
│ ├── CreatePost.js
│ ├── EditPost.js
│ └── DisplayPosts.js
├── index.js
├── logo.svg
├── graphql
│ ├── queries.js
│ ├── subscriptions.js
│ ├── mutations.js
│ └── schema.json
├── App.css
└── serviceWorker.js
├── .gitignore
├── schema.graphql
├── package.json
└── README.md
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "git.ignoreLimitWarning": true
3 | }
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/aws-appsync-amplify-react-course/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/aws-appsync-amplify-react-course/HEAD/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pdichone/aws-appsync-amplify-react-course/HEAD/public/logo512.png
--------------------------------------------------------------------------------
/.graphqlconfig.yml:
--------------------------------------------------------------------------------
1 | projects:
2 | blogfinal:
3 | schemaPath: src/graphql/schema.json
4 | includes:
5 | - src/graphql/**/*.js
6 | excludes:
7 | - ./amplify/**
8 | extensions:
9 | amplify:
10 | codeGenTarget: javascript
11 | generatedFileName: ''
12 | docsFilePath: src/graphql
13 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 | import DisplayPosts from './components/DisplayPosts'
4 | import CreatePost from './components/CreatePost';
5 | import { withAuthenticator } from 'aws-amplify-react'
6 |
7 |
8 | function App() {
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 | );
17 | }
18 |
19 |
20 | export default withAuthenticator(App,
21 | { includeGreetings: true});
22 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/src/components/UsersWhoLikedPost.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 |
4 | class UsersWhoLikedPost extends Component {
5 |
6 |
7 | render() {
8 | const allUsers = this.props.data
9 | return allUsers.map((user) => {
10 | return (
11 |
12 |
13 |
14 | {user}
15 |
16 |
17 |
18 |
19 |
20 | )
21 | })
22 |
23 | }
24 | }
25 | export default UsersWhoLikedPost
26 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import * as serviceWorker from './serviceWorker';
6 |
7 | import Amplify from 'aws-amplify'
8 | import aws_exports from './aws-exports'
9 |
10 | Amplify.configure(aws_exports)
11 |
12 |
13 |
14 |
15 | ReactDOM.render(, document.getElementById('root'));
16 |
17 | // If you want your app to work offline and load faster, you can change
18 | // unregister() to register() below. Note this comes with some pitfalls.
19 | // Learn more about service workers: https://bit.ly/CRA-PWA
20 | serviceWorker.unregister();
21 |
--------------------------------------------------------------------------------
/src/components/DeletePost.js:
--------------------------------------------------------------------------------
1 | import React, { Component} from 'react'
2 | import { API, graphqlOperation } from 'aws-amplify'
3 | import { deletePost } from '../graphql/mutations'
4 |
5 | class DeletePost extends Component {
6 |
7 |
8 | handleDeletePost = async postId => {
9 | const input = {
10 | id: postId
11 | }
12 |
13 | await API.graphql(graphqlOperation(deletePost, {input}))
14 | }
15 | render() {
16 | const post = this.props.data
17 | return (
18 |
19 | )
20 | }
21 | }
22 | export default DeletePost;
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | #amplify
26 | amplify/\#current-cloud-backend
27 | amplify/.config/local-*
28 | amplify/mock-data
29 | amplify/backend/amplify-meta.json
30 | amplify/backend/awscloudformation
31 | build/
32 | dist/
33 | node_modules/
34 | aws-exports.js
35 | awsconfiguration.json
--------------------------------------------------------------------------------
/schema.graphql:
--------------------------------------------------------------------------------
1 | type Post @model{
2 | id: ID!
3 | postOwnerId: String!
4 | postOwnerUsername: String!
5 | postTitle: String!
6 | postBody: String!
7 | createdAt: String
8 | comments: [Comment] @connection(name: "PostComments") #relationship
9 | likes: [Like] @connection(name: "PostLikes")
10 |
11 | }
12 |
13 |
14 | type Comment @model {
15 | id: ID!
16 | commentOwnerId: String!
17 | commentOwnerUsername: String!
18 | post: Post @connection(name: "PostComments")
19 | content: String!
20 | createdAt: String!
21 |
22 | }
23 |
24 | type Like @model {
25 | id: ID!
26 | numberLikes: Int!
27 | likeOwnerId: String!
28 | likeOwnerUsername: String!
29 | post: Post @connection(name: "PostLikes")
30 | }
31 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "blogfinal",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "aws-amplify": "^1.1.40",
7 | "aws-amplify-react": "^2.4.4",
8 | "react": "^16.9.0",
9 | "react-dom": "^16.9.0",
10 | "react-icons": "^3.7.0",
11 | "react-scripts": "3.1.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/components/commentPost.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | class CommentPost extends Component {
4 |
5 |
6 |
7 | render() {
8 | const { content, commentOwnerUsername, createdAt} = this.props.commentData
9 | return (
10 |
11 |
12 | {"Commment by: " } { commentOwnerUsername}
13 | {" on "}
14 |
19 |
20 |
{ content }
21 |
22 |
23 | )
24 | }
25 | }
26 | export default CommentPost
27 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 |
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/components/CreateCommentPost:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { Auth, API, graphqlOperation } from 'aws-amplify'
3 | import { createComment } from '../graphql/mutations'
4 |
5 |
6 |
7 |
8 | class CreateCommentPost extends Component {
9 |
10 | state = {
11 | commentOwnerId: "",
12 | commentOwnerUsername: "",
13 | content: ""
14 | }
15 |
16 | componentDidMount = async () => {
17 | await Auth.currentUserInfo()
18 | .then(user => {
19 | this.setState({
20 | commentOwnerId: user.attributes.sub,
21 | commentOwnerUsername: user.username
22 | })
23 | })
24 | }
25 |
26 | handleChangeContent = event => this.setState({ content: event.target.value})
27 | handleAddComment = async event => {
28 | event.preventDefault()
29 |
30 | const input = {
31 | commentPostId: this.props.postId,
32 | commentOwnerId: this.state.commentOwnerId,
33 | commentOwnerUsername: this.state.commentOwnerUsername,
34 | content: this.state.content,
35 | createdAt: new Date().toISOString()
36 | }
37 | await API.graphql(graphqlOperation(createComment, { input }))
38 |
39 | this.setState({ content: ""}) // clear field
40 | }
41 |
42 | render() {
43 |
44 | return (
45 |
46 |
47 |
67 |
68 |
69 | )
70 | }
71 | }
72 | export default CreateCommentPost
73 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/src/components/CreatePost.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { API, graphqlOperation, Auth } from 'aws-amplify'
3 | import { createPost } from '../graphql/mutations'
4 |
5 |
6 |
7 |
8 | class CreatePost extends Component {
9 |
10 | state = {
11 | postOwnerId: "",
12 | postOwnerUsername: "",
13 | postTitle: "",
14 | postBody: ""
15 | }
16 |
17 | componentDidMount = async () => {
18 | //Todo: Auth
19 | await Auth.currentUserInfo()
20 | .then(user => {
21 | this.setState({
22 | postOwnerId: user.attributes.sub,
23 | postOwnerUsername: user.username
24 |
25 | })
26 |
27 |
28 | // console.log("Curr: User: ", user.username);
29 | //console.log("Attr.Sub: User: ", user.attributes.sub);
30 |
31 | })
32 | }
33 |
34 |
35 | handleChangePost = event => this.setState({
36 | [event.target.name] : event.target.value
37 | })
38 |
39 | handleAddPost = async event => {
40 | event.preventDefault()
41 |
42 | const input = {
43 | postOwnerId: this.state.postOwnerId,
44 | postOwnerUsername: this.state.postOwnerUsername,
45 | postTitle: this.state.postTitle,
46 | postBody: this.state.postBody,
47 | createdAt: new Date().toISOString()
48 | }
49 |
50 | await API.graphql(graphqlOperation(createPost, { input }))
51 |
52 | this.setState({ postTitle: "", postBody: ""})
53 |
54 |
55 | }
56 |
57 |
58 | render() {
59 | return (
60 |
88 | )
89 | }
90 | }
91 | export default CreatePost;
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
5 |
6 | ## Available Scripts
7 |
8 | In the project directory, you can run:
9 |
10 | ### `npm start`
11 |
12 | Runs the app in the development mode.
13 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
14 |
15 | The page will reload if you make edits.
16 | You will also see any lint errors in the console.
17 |
18 | ### `npm test`
19 |
20 | Launches the test runner in the interactive watch mode.
21 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
22 |
23 | ### `npm run build`
24 |
25 | Builds the app for production to the `build` folder.
26 | It correctly bundles React in production mode and optimizes the build for the best performance.
27 |
28 | The build is minified and the filenames include the hashes.
29 | Your app is ready to be deployed!
30 |
31 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
32 |
33 | ### `npm run eject`
34 |
35 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
36 |
37 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
38 |
39 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
40 |
41 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
42 |
43 | ## Learn More
44 |
45 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
46 |
47 | To learn React, check out the [React documentation](https://reactjs.org/).
48 |
49 | ### Code Splitting
50 |
51 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
52 |
53 | ### Analyzing the Bundle Size
54 |
55 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
56 |
57 | ### Making a Progressive Web App
58 |
59 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
60 |
61 | ### Advanced Configuration
62 |
63 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
64 |
65 | ### Deployment
66 |
67 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
68 |
69 | ### `npm run build` fails to minify
70 |
71 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
72 |
--------------------------------------------------------------------------------
/src/graphql/queries.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const getPost = `query GetPost($id: ID!) {
5 | getPost(id: $id) {
6 | id
7 | postOwnerId
8 | postOwnerUsername
9 | postTitle
10 | postBody
11 | createdAt
12 | comments {
13 | items {
14 | id
15 | commentOwnerId
16 | commentOwnerUsername
17 | content
18 | createdAt
19 | }
20 | nextToken
21 | }
22 | likes {
23 | items {
24 | id
25 | numberLikes
26 | likeOwnerId
27 | likeOwnerUsername
28 | }
29 | nextToken
30 | }
31 | }
32 | }
33 | `;
34 | export const listPosts = `query ListPosts(
35 | $filter: ModelPostFilterInput
36 | $limit: Int
37 | $nextToken: String
38 | ) {
39 | listPosts(filter: $filter, limit: $limit, nextToken: $nextToken) {
40 | items {
41 | id
42 | postOwnerId
43 | postOwnerUsername
44 | postTitle
45 | postBody
46 | createdAt
47 | comments {
48 | items {
49 | id
50 | commentOwnerId
51 | commentOwnerUsername
52 | content
53 | createdAt
54 | }
55 | }
56 | likes {
57 | items {
58 | id
59 | numberLikes
60 | likeOwnerId
61 | likeOwnerUsername
62 | }
63 | }
64 | }
65 | nextToken
66 | }
67 | }
68 | `;
69 | export const getComment = `query GetComment($id: ID!) {
70 | getComment(id: $id) {
71 | id
72 | commentOwnerId
73 | commentOwnerUsername
74 | post {
75 | id
76 | postOwnerId
77 | postOwnerUsername
78 | postTitle
79 | postBody
80 | createdAt
81 | comments {
82 | nextToken
83 | }
84 | likes {
85 | nextToken
86 | }
87 | }
88 | content
89 | createdAt
90 | }
91 | }
92 | `;
93 | export const listComments = `query ListComments(
94 | $filter: ModelCommentFilterInput
95 | $limit: Int
96 | $nextToken: String
97 | ) {
98 | listComments(filter: $filter, limit: $limit, nextToken: $nextToken) {
99 | items {
100 | id
101 | commentOwnerId
102 | commentOwnerUsername
103 | post {
104 | id
105 | postOwnerId
106 | postOwnerUsername
107 | postTitle
108 | postBody
109 | createdAt
110 | }
111 | content
112 | createdAt
113 | }
114 | nextToken
115 | }
116 | }
117 | `;
118 | export const getLike = `query GetLike($id: ID!) {
119 | getLike(id: $id) {
120 | id
121 | numberLikes
122 | likeOwnerId
123 | likeOwnerUsername
124 | post {
125 | id
126 | postOwnerId
127 | postOwnerUsername
128 | postTitle
129 | postBody
130 | createdAt
131 | comments {
132 | nextToken
133 | }
134 | likes {
135 | nextToken
136 | }
137 | }
138 | }
139 | }
140 | `;
141 | export const listLikes = `query ListLikes(
142 | $filter: ModelLikeFilterInput
143 | $limit: Int
144 | $nextToken: String
145 | ) {
146 | listLikes(filter: $filter, limit: $limit, nextToken: $nextToken) {
147 | items {
148 | id
149 | numberLikes
150 | likeOwnerId
151 | likeOwnerUsername
152 | post {
153 | id
154 | postOwnerId
155 | postOwnerUsername
156 | postTitle
157 | postBody
158 | createdAt
159 | }
160 | }
161 | nextToken
162 | }
163 | }
164 | `;
165 |
--------------------------------------------------------------------------------
/src/components/EditPost.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { Auth, API, graphqlOperation } from 'aws-amplify'
3 | import { updatePost } from '../graphql/mutations'
4 |
5 |
6 | class EditPost extends Component {
7 |
8 | state = {
9 | show: false,
10 | id: "",
11 | postOwnerId: "",
12 | postOwnerUsername: "",
13 | postTitle: "",
14 | postBody: "",
15 | postData: {
16 | postTitle: this.props.postTitle,
17 | postBody: this.props.postBody
18 | }
19 |
20 | }
21 |
22 | handleModal = () => {
23 | this.setState({ show: !this.state.show})
24 | document.body.scrollTop = 0
25 | document.documentElement.scrollTop = 0
26 | }
27 |
28 | handleUpdatePost = async (event) => {
29 | event.preventDefault()
30 |
31 | const input = {
32 | id: this.props.id,
33 | postOwnerId: this.state.postOwnerId,
34 | postOwnerUsername: this.state.postOwnerUsername,
35 | postTitle: this.state.postData.postTitle,
36 | postBody: this.state.postData.postBody
37 |
38 | }
39 |
40 | await API.graphql(graphqlOperation(updatePost, { input }))
41 |
42 | //force close the modal
43 | this.setState({ show: !this.state.show})
44 |
45 | }
46 |
47 | handleTitle = event => {
48 | this.setState({
49 | postData: {...this.state.postData, postTitle: event.target.value}
50 |
51 | })
52 | }
53 | handleBody = event => {
54 | this.setState({ postData: {...this.state.postData,
55 | postBody: event.target.value}})
56 | }
57 | componentWillMount = async () => {
58 |
59 | await Auth.currentUserInfo()
60 | .then(user => {
61 | this.setState({
62 | postOwnerId: user.attributes.sub,
63 | postOwnerUsername: user.username
64 | })
65 | })
66 |
67 | }
68 |
69 | render() {
70 | return (
71 | <>
72 | { this.state.show && (
73 |
74 |
78 |
79 |
100 |
101 |
102 |
103 | )
104 | }
105 |
106 |
107 |
108 |
109 | >
110 |
111 |
112 | )
113 | }
114 | }
115 |
116 | export default EditPost;
117 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
6 | sans-serif;
7 | -webkit-font-smoothing: antialiased;
8 | -moz-osx-font-smoothing: grayscale;
9 | color: #282c34;
10 | }
11 |
12 | code {
13 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
14 | monospace;
15 | }
16 |
17 | .App {
18 | max-width: 900px;
19 | margin: 2rem auto 0 auto;
20 | padding: 1rem;
21 | background-color: rgb(255, 255, 255);
22 | font-size: 1rem;
23 | box-shadow: 1px 1px 9px 7px #36181833;
24 | color: #282c34
25 |
26 | }
27 |
28 | .container {
29 | padding: 0 1rem;
30 | text-align: right;
31 |
32 | }
33 | input[type=text], select {
34 | width: 100%;
35 | padding: 12px 20px;
36 | margin: 8px 0;
37 | display: inline-block;
38 | border: 1px solid #ccc;
39 | border-radius: 4px;
40 | box-sizing: border-box;
41 | }
42 |
43 | input[type=submit] {
44 | width: 100%;
45 | background-color: #4CAF50;
46 | color: white;
47 | padding: 14px 20px;
48 | margin: 8px 0;
49 | border: none;
50 | border-radius: 4px;
51 | cursor: pointer;
52 | }
53 |
54 | input[type=submit]:hover {
55 | background-color: #45a049;
56 | }
57 |
58 | .add-post{
59 | display: flex;
60 | flex-direction: column;
61 | max-width: 100%;
62 | margin: 1rem;
63 | padding: 1rem;
64 | }
65 |
66 |
67 | .posts{
68 | display: flex;
69 | flex-direction: column;
70 | box-shadow: 1px 1px 9px 7px #36181833;
71 |
72 | padding: .5rem;
73 | }
74 |
75 |
76 | .posts div{
77 | box-shadow: 1px 1px 1px rgb(182, 235, 171);
78 | padding: .5rem;
79 | margin: .6rem;
80 | background-color: white;
81 | }
82 |
83 | .modal{
84 | position: absolute;
85 | top:40px;
86 | right: 200px;
87 | width: 60%;
88 | height: 40%;
89 | box-shadow: 4px 4px 4px rgb(114, 116, 114);
90 | animation: move .2s backwards;
91 | }
92 | .modal-likes{
93 | position: absolute;
94 | top:40px;
95 | right: 200px;
96 | width: 60%;
97 | height: 40%;
98 | box-shadow: 4px 4px 4px rgb(114, 116, 114);
99 | animation: move .2s backwards;
100 | }
101 | div {
102 | border-radius: 5px;
103 | background-color: #f2f2f2;
104 | padding: 20px;
105 | }
106 | .clean-area {
107 | border-radius: 0px;
108 | background-color: #45a049;
109 | }
110 | .btn-delete {
111 | display: inline-block;
112 | width: 100%;
113 | border-radius: 4px;
114 | /* border: none; */
115 | background: #0ca5e297;
116 | color: #ffffff;
117 | padding: 7px 20px;
118 | cursor: pointer;
119 | }
120 |
121 | .App-logo {
122 | animation: App-logo-spin infinite 20s linear;
123 | height: 40vmin;
124 | pointer-events: none;
125 | }
126 |
127 | .App-header {
128 | background-color: #282c34;
129 | min-height: 100vh;
130 | display: flex;
131 | flex-direction: column;
132 | align-items: center;
133 | justify-content: center;
134 | font-size: calc(10px + 2vmin);
135 | color: white;
136 | }
137 |
138 | .close{
139 | width:40px;
140 | border-radius: 150px;
141 | float: right;
142 | }
143 | input,textarea{
144 | margin: .3rem;
145 | padding: 1rem;
146 | font-size: 1.2rem;
147 | }
148 | button{
149 | width:30%;
150 | background-color: rgb(49, 142, 248);
151 | padding: .8rem;
152 | font-weight: 500;
153 | border-radius: 4px;
154 | float: right;
155 | color: aliceblue;
156 | font-size: 1rem;
157 | cursor: pointer;
158 | margin-top: 15px;
159 | }
160 |
161 | .users-liked {
162 | width: 100px;
163 | color: #282c34;
164 | border: none;
165 | background-color: "gray";
166 | padding: 2px;
167 | }
168 | .alert {
169 | font-weight: 200;
170 | color: crimson;
171 | font-style: italic;
172 | font-size: 14px;
173 | }
174 | .like-button {
175 | font-weight: 600;
176 | border-radius: 6;
177 | padding: "8px";
178 | color: rgb(80, 82, 80);
179 | width: "40px";
180 | font-style: italic;
181 | cursor: pointer;
182 | }
183 |
184 |
185 | button:hover{
186 | background-color: rgba(9, 123, 216, 0.808);
187 | }
188 |
189 | .App-link {
190 | color: #61dafb;
191 | }
192 |
193 | @keyframes App-logo-spin {
194 | from {
195 | transform: rotate(0deg);
196 | }
197 | to {
198 | transform: rotate(360deg);
199 | }
200 | }
201 |
--------------------------------------------------------------------------------
/src/graphql/subscriptions.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const onCreatePost = `subscription OnCreatePost {
5 | onCreatePost {
6 | id
7 | postOwnerId
8 | postOwnerUsername
9 | postTitle
10 | postBody
11 | createdAt
12 | comments {
13 | items {
14 | id
15 | commentOwnerId
16 | commentOwnerUsername
17 | content
18 | createdAt
19 | }
20 | nextToken
21 | }
22 | likes {
23 | items {
24 | id
25 | numberLikes
26 | likeOwnerId
27 | likeOwnerUsername
28 | }
29 | nextToken
30 | }
31 | }
32 | }
33 | `;
34 | export const onUpdatePost = `subscription OnUpdatePost {
35 | onUpdatePost {
36 | id
37 | postOwnerId
38 | postOwnerUsername
39 | postTitle
40 | postBody
41 | createdAt
42 | comments {
43 | items {
44 | id
45 | commentOwnerId
46 | commentOwnerUsername
47 | content
48 | createdAt
49 | }
50 | nextToken
51 | }
52 | likes {
53 | items {
54 | id
55 | numberLikes
56 | likeOwnerId
57 | likeOwnerUsername
58 | }
59 | nextToken
60 | }
61 | }
62 | }
63 | `;
64 | export const onDeletePost = `subscription OnDeletePost {
65 | onDeletePost {
66 | id
67 | postOwnerId
68 | postOwnerUsername
69 | postTitle
70 | postBody
71 | createdAt
72 | comments {
73 | items {
74 | id
75 | commentOwnerId
76 | commentOwnerUsername
77 | content
78 | createdAt
79 | }
80 | nextToken
81 | }
82 | likes {
83 | items {
84 | id
85 | numberLikes
86 | likeOwnerId
87 | likeOwnerUsername
88 | }
89 | nextToken
90 | }
91 | }
92 | }
93 | `;
94 | export const onCreateComment = `subscription OnCreateComment {
95 | onCreateComment {
96 | id
97 | commentOwnerId
98 | commentOwnerUsername
99 | post {
100 | id
101 | postOwnerId
102 | postOwnerUsername
103 | postTitle
104 | postBody
105 | createdAt
106 | comments {
107 | nextToken
108 | }
109 | likes {
110 | nextToken
111 | }
112 | }
113 | content
114 | createdAt
115 | }
116 | }
117 | `;
118 | export const onUpdateComment = `subscription OnUpdateComment {
119 | onUpdateComment {
120 | id
121 | commentOwnerId
122 | commentOwnerUsername
123 | post {
124 | id
125 | postOwnerId
126 | postOwnerUsername
127 | postTitle
128 | postBody
129 | createdAt
130 | comments {
131 | nextToken
132 | }
133 | likes {
134 | nextToken
135 | }
136 | }
137 | content
138 | createdAt
139 | }
140 | }
141 | `;
142 | export const onDeleteComment = `subscription OnDeleteComment {
143 | onDeleteComment {
144 | id
145 | commentOwnerId
146 | commentOwnerUsername
147 | post {
148 | id
149 | postOwnerId
150 | postOwnerUsername
151 | postTitle
152 | postBody
153 | createdAt
154 | comments {
155 | nextToken
156 | }
157 | likes {
158 | nextToken
159 | }
160 | }
161 | content
162 | createdAt
163 | }
164 | }
165 | `;
166 | export const onCreateLike = `subscription OnCreateLike {
167 | onCreateLike {
168 | id
169 | numberLikes
170 | likeOwnerId
171 | likeOwnerUsername
172 | post {
173 | id
174 | postOwnerId
175 | postOwnerUsername
176 | postTitle
177 | postBody
178 | createdAt
179 | comments {
180 | nextToken
181 | }
182 | likes {
183 | nextToken
184 | }
185 | }
186 | }
187 | }
188 | `;
189 | export const onUpdateLike = `subscription OnUpdateLike {
190 | onUpdateLike {
191 | id
192 | numberLikes
193 | likeOwnerId
194 | likeOwnerUsername
195 | post {
196 | id
197 | postOwnerId
198 | postOwnerUsername
199 | postTitle
200 | postBody
201 | createdAt
202 | comments {
203 | nextToken
204 | }
205 | likes {
206 | nextToken
207 | }
208 | }
209 | }
210 | }
211 | `;
212 | export const onDeleteLike = `subscription OnDeleteLike {
213 | onDeleteLike {
214 | id
215 | numberLikes
216 | likeOwnerId
217 | likeOwnerUsername
218 | post {
219 | id
220 | postOwnerId
221 | postOwnerUsername
222 | postTitle
223 | postBody
224 | createdAt
225 | comments {
226 | nextToken
227 | }
228 | likes {
229 | nextToken
230 | }
231 | }
232 | }
233 | }
234 | `;
235 |
--------------------------------------------------------------------------------
/src/graphql/mutations.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const createPost = `mutation CreatePost($input: CreatePostInput!) {
5 | createPost(input: $input) {
6 | id
7 | postOwnerId
8 | postOwnerUsername
9 | postTitle
10 | postBody
11 | createdAt
12 | comments {
13 | items {
14 | id
15 | commentOwnerId
16 | commentOwnerUsername
17 | content
18 | createdAt
19 | }
20 | nextToken
21 | }
22 | likes {
23 | items {
24 | id
25 | numberLikes
26 | likeOwnerId
27 | likeOwnerUsername
28 | }
29 | nextToken
30 | }
31 | }
32 | }
33 | `;
34 | export const updatePost = `mutation UpdatePost($input: UpdatePostInput!) {
35 | updatePost(input: $input) {
36 | id
37 | postOwnerId
38 | postOwnerUsername
39 | postTitle
40 | postBody
41 | createdAt
42 | comments {
43 | items {
44 | id
45 | commentOwnerId
46 | commentOwnerUsername
47 | content
48 | createdAt
49 | }
50 | nextToken
51 | }
52 | likes {
53 | items {
54 | id
55 | numberLikes
56 | likeOwnerId
57 | likeOwnerUsername
58 | }
59 | nextToken
60 | }
61 | }
62 | }
63 | `;
64 | export const deletePost = `mutation DeletePost($input: DeletePostInput!) {
65 | deletePost(input: $input) {
66 | id
67 | postOwnerId
68 | postOwnerUsername
69 | postTitle
70 | postBody
71 | createdAt
72 | comments {
73 | items {
74 | id
75 | commentOwnerId
76 | commentOwnerUsername
77 | content
78 | createdAt
79 | }
80 | nextToken
81 | }
82 | likes {
83 | items {
84 | id
85 | numberLikes
86 | likeOwnerId
87 | likeOwnerUsername
88 | }
89 | nextToken
90 | }
91 | }
92 | }
93 | `;
94 | export const createComment = `mutation CreateComment($input: CreateCommentInput!) {
95 | createComment(input: $input) {
96 | id
97 | commentOwnerId
98 | commentOwnerUsername
99 | post {
100 | id
101 | postOwnerId
102 | postOwnerUsername
103 | postTitle
104 | postBody
105 | createdAt
106 | comments {
107 | nextToken
108 | }
109 | likes {
110 | nextToken
111 | }
112 | }
113 | content
114 | createdAt
115 | }
116 | }
117 | `;
118 | export const updateComment = `mutation UpdateComment($input: UpdateCommentInput!) {
119 | updateComment(input: $input) {
120 | id
121 | commentOwnerId
122 | commentOwnerUsername
123 | post {
124 | id
125 | postOwnerId
126 | postOwnerUsername
127 | postTitle
128 | postBody
129 | createdAt
130 | comments {
131 | nextToken
132 | }
133 | likes {
134 | nextToken
135 | }
136 | }
137 | content
138 | createdAt
139 | }
140 | }
141 | `;
142 | export const deleteComment = `mutation DeleteComment($input: DeleteCommentInput!) {
143 | deleteComment(input: $input) {
144 | id
145 | commentOwnerId
146 | commentOwnerUsername
147 | post {
148 | id
149 | postOwnerId
150 | postOwnerUsername
151 | postTitle
152 | postBody
153 | createdAt
154 | comments {
155 | nextToken
156 | }
157 | likes {
158 | nextToken
159 | }
160 | }
161 | content
162 | createdAt
163 | }
164 | }
165 | `;
166 | export const createLike = `mutation CreateLike($input: CreateLikeInput!) {
167 | createLike(input: $input) {
168 | id
169 | numberLikes
170 | likeOwnerId
171 | likeOwnerUsername
172 | post {
173 | id
174 | postOwnerId
175 | postOwnerUsername
176 | postTitle
177 | postBody
178 | createdAt
179 | comments {
180 | nextToken
181 | }
182 | likes {
183 | nextToken
184 | }
185 | }
186 | }
187 | }
188 | `;
189 | export const updateLike = `mutation UpdateLike($input: UpdateLikeInput!) {
190 | updateLike(input: $input) {
191 | id
192 | numberLikes
193 | likeOwnerId
194 | likeOwnerUsername
195 | post {
196 | id
197 | postOwnerId
198 | postOwnerUsername
199 | postTitle
200 | postBody
201 | createdAt
202 | comments {
203 | nextToken
204 | }
205 | likes {
206 | nextToken
207 | }
208 | }
209 | }
210 | }
211 | `;
212 | export const deleteLike = `mutation DeleteLike($input: DeleteLikeInput!) {
213 | deleteLike(input: $input) {
214 | id
215 | numberLikes
216 | likeOwnerId
217 | likeOwnerUsername
218 | post {
219 | id
220 | postOwnerId
221 | postOwnerUsername
222 | postTitle
223 | postBody
224 | createdAt
225 | comments {
226 | nextToken
227 | }
228 | likes {
229 | nextToken
230 | }
231 | }
232 | }
233 | }
234 | `;
235 |
--------------------------------------------------------------------------------
/src/serviceWorker.js:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read https://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.1/8 is considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | export function register(config) {
24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
25 | // The URL constructor is available in all browsers that support SW.
26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
27 | if (publicUrl.origin !== window.location.origin) {
28 | // Our service worker won't work if PUBLIC_URL is on a different origin
29 | // from what our page is served on. This might happen if a CDN is used to
30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
31 | return;
32 | }
33 |
34 | window.addEventListener('load', () => {
35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
36 |
37 | if (isLocalhost) {
38 | // This is running on localhost. Let's check if a service worker still exists or not.
39 | checkValidServiceWorker(swUrl, config);
40 |
41 | // Add some additional logging to localhost, pointing developers to the
42 | // service worker/PWA documentation.
43 | navigator.serviceWorker.ready.then(() => {
44 | console.log(
45 | 'This web app is being served cache-first by a service ' +
46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA'
47 | );
48 | });
49 | } else {
50 | // Is not localhost. Just register service worker
51 | registerValidSW(swUrl, config);
52 | }
53 | });
54 | }
55 | }
56 |
57 | function registerValidSW(swUrl, config) {
58 | navigator.serviceWorker
59 | .register(swUrl)
60 | .then(registration => {
61 | registration.onupdatefound = () => {
62 | const installingWorker = registration.installing;
63 | if (installingWorker == null) {
64 | return;
65 | }
66 | installingWorker.onstatechange = () => {
67 | if (installingWorker.state === 'installed') {
68 | if (navigator.serviceWorker.controller) {
69 | // At this point, the updated precached content has been fetched,
70 | // but the previous service worker will still serve the older
71 | // content until all client tabs are closed.
72 | console.log(
73 | 'New content is available and will be used when all ' +
74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
75 | );
76 |
77 | // Execute callback
78 | if (config && config.onUpdate) {
79 | config.onUpdate(registration);
80 | }
81 | } else {
82 | // At this point, everything has been precached.
83 | // It's the perfect time to display a
84 | // "Content is cached for offline use." message.
85 | console.log('Content is cached for offline use.');
86 |
87 | // Execute callback
88 | if (config && config.onSuccess) {
89 | config.onSuccess(registration);
90 | }
91 | }
92 | }
93 | };
94 | };
95 | })
96 | .catch(error => {
97 | console.error('Error during service worker registration:', error);
98 | });
99 | }
100 |
101 | function checkValidServiceWorker(swUrl, config) {
102 | // Check if the service worker can be found. If it can't reload the page.
103 | fetch(swUrl)
104 | .then(response => {
105 | // Ensure service worker exists, and that we really are getting a JS file.
106 | const contentType = response.headers.get('content-type');
107 | if (
108 | response.status === 404 ||
109 | (contentType != null && contentType.indexOf('javascript') === -1)
110 | ) {
111 | // No service worker found. Probably a different app. Reload the page.
112 | navigator.serviceWorker.ready.then(registration => {
113 | registration.unregister().then(() => {
114 | window.location.reload();
115 | });
116 | });
117 | } else {
118 | // Service worker found. Proceed as normal.
119 | registerValidSW(swUrl, config);
120 | }
121 | })
122 | .catch(() => {
123 | console.log(
124 | 'No internet connection found. App is running in offline mode.'
125 | );
126 | });
127 | }
128 |
129 | export function unregister() {
130 | if ('serviceWorker' in navigator) {
131 | navigator.serviceWorker.ready.then(registration => {
132 | registration.unregister();
133 | });
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/src/components/DisplayPosts.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { listPosts } from '../graphql/queries'
3 | import { API, graphqlOperation } from 'aws-amplify'
4 | import DeletePost from './DeletePost'
5 | import EditPost from './EditPost'
6 | import { onCreatePost, onDeletePost, onUpdatePost, onCreateComment, onCreateLike } from '../graphql/subscriptions'
7 | import { createLike } from '../graphql/mutations'
8 | import CreateCommentPost from './CreateCommentPost'
9 | import CommentPost from './CommentPost'
10 | import { FaThumbsUp, FaSadTear } from 'react-icons/fa';
11 | import {Auth} from 'aws-amplify'
12 | import UsersWhoLikedPost from './UsersWhoLikedPost'
13 |
14 | class DisplayPosts extends Component {
15 |
16 | state = {
17 | ownerId:"",
18 | ownerUsername:"",
19 | errorMessage: "",
20 | postLikedBy: [],
21 | isHovering: false,
22 | posts: []
23 | }
24 |
25 | componentDidMount = async () => {
26 | this.getPosts()
27 |
28 | await Auth.currentUserInfo()
29 | .then(user => {
30 | this.setState(
31 | {
32 | ownerId: user.attributes.sub,
33 | ownerUsername: user.username,
34 | }
35 | )
36 | })
37 |
38 |
39 | this.createPostListener = API.graphql(graphqlOperation(onCreatePost))
40 | .subscribe({
41 | next: postData => {
42 | const newPost = postData.value.data.onCreatePost
43 | const prevPosts = this.state.posts.filter( post => post.id !== newPost.id)
44 |
45 | const updatedPosts = [newPost, ...prevPosts]
46 |
47 | this.setState({ posts: updatedPosts})
48 | }
49 | })
50 |
51 | this.deletePostListener = API.graphql(graphqlOperation(onDeletePost))
52 | .subscribe({
53 | next: postData => {
54 |
55 | const deletedPost = postData.value.data.onDeletePost
56 | const updatedPosts = this.state.posts.filter(post => post.id !== deletedPost.id)
57 | this.setState({posts: updatedPosts})
58 | }
59 | })
60 |
61 | this.updatePostListener = API.graphql(graphqlOperation(onUpdatePost))
62 | .subscribe({
63 | next: postData => {
64 | const { posts } = this.state
65 | const updatePost = postData.value.data.onUpdatePost
66 | const index = posts.findIndex(post => post.id === updatePost.id) //had forgotten to say updatePost.id!
67 | const updatePosts = [
68 | ...posts.slice(0, index),
69 | updatePost,
70 | ...posts.slice(index + 1)
71 | ]
72 |
73 | this.setState({ posts: updatePosts})
74 |
75 | }
76 | })
77 |
78 | this.createPostCommentListener = API.graphql(graphqlOperation(onCreateComment))
79 | .subscribe({
80 | next: commentData => {
81 | const createdComment = commentData.value.data.onCreateComment
82 | let posts = [ ...this.state.posts]
83 |
84 | for (let post of posts ) {
85 | if ( createdComment.post.id === post.id) {
86 | post.comments.items.push(createdComment)
87 | }
88 | }
89 | this.setState({ posts})
90 | }
91 | })
92 |
93 | this.createPostLikeListener = API.graphql(graphqlOperation(onCreateLike))
94 | .subscribe({
95 | next: postData => {
96 | const createdLike = postData.value.data.onCreateLike
97 |
98 | let posts = [...this.state.posts]
99 | for (let post of posts ) {
100 | if (createdLike.post.id === post.id) {
101 | post.likes.items.push(createdLike)
102 | }
103 | }
104 | this.setState({ posts })
105 |
106 | }
107 | })
108 | }
109 |
110 |
111 | componentWillUnmount() {
112 | this.createPostListener.unsubscribe()
113 | this.deletePostListener.unsubscribe()
114 | this.updatePostListener.unsubscribe()
115 | this.createPostCommentListener.unsubscribe()
116 | this.createPostLikeListener.unsubscribe()
117 | }
118 |
119 | getPosts = async () => {
120 | const result = await API.graphql(graphqlOperation(listPosts))
121 |
122 | this.setState({ posts: result.data.listPosts.items})
123 | //console.log("All Posts: ", JSON.stringify(result.data.listPosts.items))
124 | //console.log("All Posts: ", result.data.listPosts.items)
125 | }
126 |
127 | likedPost = (postId) => {
128 |
129 | for (let post of this.state.posts) {
130 | if ( post.id === postId ) {
131 | if ( post.postOwnerId === this.state.ownerId) return true;
132 | for (let like of post.likes.items) {
133 | if (like.likeOwnerId === this.state.ownerId) {
134 | return true;
135 | }
136 | }
137 | }
138 | }
139 | return false;
140 | }
141 |
142 | handleLike = async postId => {
143 | if (this.likedPost(postId)) {return this.setState({errorMessage: "Can't Like Your Own Post."})} else {
144 | const input = {
145 | numberLikes: 1,
146 | likeOwnerId: this.state.ownerId,
147 | likeOwnerUsername: this.state.ownerUsername,
148 | likePostId: postId
149 | }
150 |
151 | try {
152 | const result = await API.graphql(graphqlOperation(createLike, { input }))
153 |
154 | console.log("Liked: ", result.data);
155 |
156 | }catch (error) {
157 | console.error(error)
158 |
159 | }
160 | }
161 |
162 | }
163 |
164 | handleMouseHover = async postId => {
165 | this.setState({isHovering: !this.state.isHovering})
166 |
167 | let innerLikes = this.state.postLikedBy
168 |
169 | for (let post of this.state.posts) {
170 | if (post.id === postId) {
171 | for ( let like of post.likes.items) {
172 | innerLikes.push(like.likeOwnerUsername)
173 | }
174 | }
175 |
176 | this.setState({postLikedBy: innerLikes})
177 |
178 |
179 | }
180 |
181 | console.log("Post liked by: ", this.state.postLikedBy);
182 |
183 |
184 |
185 | }
186 |
187 | handleMouseHoverLeave = async () => {
188 | this.setState({isHovering: !this.state.isHovering})
189 | this.setState({postLikedBy: []})
190 |
191 |
192 |
193 |
194 | }
195 |
196 | render() {
197 | const { posts } = this.state
198 |
199 | let loggedInUser = this.state.ownerId
200 |
201 | return posts.map(( post ) => {
202 |
203 | return (
204 |
205 |
{ post.postTitle }
206 |
207 | { "Wrote by: " } { post.postOwnerUsername}
208 |
209 | {" on "}
210 |
215 |
216 |
217 |
218 |
{ post.postBody }
219 |
220 |
221 |
222 | {post.postOwnerId === loggedInUser &&
223 |
224 | }
225 |
226 | { post.postOwnerId === loggedInUser &&
227 |
228 | }
229 |
230 |
231 |
232 | { post.postOwnerId === loggedInUser && this.state.errorMessage}
233 | this.handleMouseHover(post.id)}
234 | onMouseLeave={ () => this.handleMouseHoverLeave()}
235 | onClick={() => this.handleLike(post.id)}
236 | style={{color: (post.likes.items.length > 0) ? "blue": "gray"}}
237 | className="like-button">
238 |
239 | {post.likes.items.length}
240 |
241 | {
242 | this.state.isHovering &&
243 |
244 | {this.state.postLikedBy.length === 0 ?
245 | " Liked by No one " : "Liked by: " }
246 | {this.state.postLikedBy.length === 0 ? : }
247 |
248 |
249 | }
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 | { post.comments.items.length > 0 &&
259 | Comments: }
260 | {
261 | post.comments.items.map((comment, index) => )
262 | }
263 |
264 |
265 |
266 |
267 |
268 | )
269 |
270 | })
271 | }
272 | }
273 |
274 | const rowStyle = {
275 | background: '#f4f4f4',
276 | padding: '10px',
277 | border: '1px #ccc dotted',
278 | margin: '14px'
279 | }
280 | export default DisplayPosts;
281 |
--------------------------------------------------------------------------------
/src/graphql/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "data" : {
3 | "__schema" : {
4 | "queryType" : {
5 | "name" : "Query"
6 | },
7 | "mutationType" : {
8 | "name" : "Mutation"
9 | },
10 | "subscriptionType" : {
11 | "name" : "Subscription"
12 | },
13 | "types" : [ {
14 | "kind" : "OBJECT",
15 | "name" : "Query",
16 | "description" : null,
17 | "fields" : [ {
18 | "name" : "getPost",
19 | "description" : null,
20 | "args" : [ {
21 | "name" : "id",
22 | "description" : null,
23 | "type" : {
24 | "kind" : "NON_NULL",
25 | "name" : null,
26 | "ofType" : {
27 | "kind" : "SCALAR",
28 | "name" : "ID",
29 | "ofType" : null
30 | }
31 | },
32 | "defaultValue" : null
33 | } ],
34 | "type" : {
35 | "kind" : "OBJECT",
36 | "name" : "Post",
37 | "ofType" : null
38 | },
39 | "isDeprecated" : false,
40 | "deprecationReason" : null
41 | }, {
42 | "name" : "listPosts",
43 | "description" : null,
44 | "args" : [ {
45 | "name" : "filter",
46 | "description" : null,
47 | "type" : {
48 | "kind" : "INPUT_OBJECT",
49 | "name" : "ModelPostFilterInput",
50 | "ofType" : null
51 | },
52 | "defaultValue" : null
53 | }, {
54 | "name" : "limit",
55 | "description" : null,
56 | "type" : {
57 | "kind" : "SCALAR",
58 | "name" : "Int",
59 | "ofType" : null
60 | },
61 | "defaultValue" : null
62 | }, {
63 | "name" : "nextToken",
64 | "description" : null,
65 | "type" : {
66 | "kind" : "SCALAR",
67 | "name" : "String",
68 | "ofType" : null
69 | },
70 | "defaultValue" : null
71 | } ],
72 | "type" : {
73 | "kind" : "OBJECT",
74 | "name" : "ModelPostConnection",
75 | "ofType" : null
76 | },
77 | "isDeprecated" : false,
78 | "deprecationReason" : null
79 | }, {
80 | "name" : "getComment",
81 | "description" : null,
82 | "args" : [ {
83 | "name" : "id",
84 | "description" : null,
85 | "type" : {
86 | "kind" : "NON_NULL",
87 | "name" : null,
88 | "ofType" : {
89 | "kind" : "SCALAR",
90 | "name" : "ID",
91 | "ofType" : null
92 | }
93 | },
94 | "defaultValue" : null
95 | } ],
96 | "type" : {
97 | "kind" : "OBJECT",
98 | "name" : "Comment",
99 | "ofType" : null
100 | },
101 | "isDeprecated" : false,
102 | "deprecationReason" : null
103 | }, {
104 | "name" : "listComments",
105 | "description" : null,
106 | "args" : [ {
107 | "name" : "filter",
108 | "description" : null,
109 | "type" : {
110 | "kind" : "INPUT_OBJECT",
111 | "name" : "ModelCommentFilterInput",
112 | "ofType" : null
113 | },
114 | "defaultValue" : null
115 | }, {
116 | "name" : "limit",
117 | "description" : null,
118 | "type" : {
119 | "kind" : "SCALAR",
120 | "name" : "Int",
121 | "ofType" : null
122 | },
123 | "defaultValue" : null
124 | }, {
125 | "name" : "nextToken",
126 | "description" : null,
127 | "type" : {
128 | "kind" : "SCALAR",
129 | "name" : "String",
130 | "ofType" : null
131 | },
132 | "defaultValue" : null
133 | } ],
134 | "type" : {
135 | "kind" : "OBJECT",
136 | "name" : "ModelCommentConnection",
137 | "ofType" : null
138 | },
139 | "isDeprecated" : false,
140 | "deprecationReason" : null
141 | }, {
142 | "name" : "getLike",
143 | "description" : null,
144 | "args" : [ {
145 | "name" : "id",
146 | "description" : null,
147 | "type" : {
148 | "kind" : "NON_NULL",
149 | "name" : null,
150 | "ofType" : {
151 | "kind" : "SCALAR",
152 | "name" : "ID",
153 | "ofType" : null
154 | }
155 | },
156 | "defaultValue" : null
157 | } ],
158 | "type" : {
159 | "kind" : "OBJECT",
160 | "name" : "Like",
161 | "ofType" : null
162 | },
163 | "isDeprecated" : false,
164 | "deprecationReason" : null
165 | }, {
166 | "name" : "listLikes",
167 | "description" : null,
168 | "args" : [ {
169 | "name" : "filter",
170 | "description" : null,
171 | "type" : {
172 | "kind" : "INPUT_OBJECT",
173 | "name" : "ModelLikeFilterInput",
174 | "ofType" : null
175 | },
176 | "defaultValue" : null
177 | }, {
178 | "name" : "limit",
179 | "description" : null,
180 | "type" : {
181 | "kind" : "SCALAR",
182 | "name" : "Int",
183 | "ofType" : null
184 | },
185 | "defaultValue" : null
186 | }, {
187 | "name" : "nextToken",
188 | "description" : null,
189 | "type" : {
190 | "kind" : "SCALAR",
191 | "name" : "String",
192 | "ofType" : null
193 | },
194 | "defaultValue" : null
195 | } ],
196 | "type" : {
197 | "kind" : "OBJECT",
198 | "name" : "ModelLikeConnection",
199 | "ofType" : null
200 | },
201 | "isDeprecated" : false,
202 | "deprecationReason" : null
203 | } ],
204 | "inputFields" : null,
205 | "interfaces" : [ ],
206 | "enumValues" : null,
207 | "possibleTypes" : null
208 | }, {
209 | "kind" : "OBJECT",
210 | "name" : "Post",
211 | "description" : null,
212 | "fields" : [ {
213 | "name" : "id",
214 | "description" : null,
215 | "args" : [ ],
216 | "type" : {
217 | "kind" : "NON_NULL",
218 | "name" : null,
219 | "ofType" : {
220 | "kind" : "SCALAR",
221 | "name" : "ID",
222 | "ofType" : null
223 | }
224 | },
225 | "isDeprecated" : false,
226 | "deprecationReason" : null
227 | }, {
228 | "name" : "postOwnerId",
229 | "description" : null,
230 | "args" : [ ],
231 | "type" : {
232 | "kind" : "NON_NULL",
233 | "name" : null,
234 | "ofType" : {
235 | "kind" : "SCALAR",
236 | "name" : "String",
237 | "ofType" : null
238 | }
239 | },
240 | "isDeprecated" : false,
241 | "deprecationReason" : null
242 | }, {
243 | "name" : "postOwnerUsername",
244 | "description" : null,
245 | "args" : [ ],
246 | "type" : {
247 | "kind" : "NON_NULL",
248 | "name" : null,
249 | "ofType" : {
250 | "kind" : "SCALAR",
251 | "name" : "String",
252 | "ofType" : null
253 | }
254 | },
255 | "isDeprecated" : false,
256 | "deprecationReason" : null
257 | }, {
258 | "name" : "postTitle",
259 | "description" : null,
260 | "args" : [ ],
261 | "type" : {
262 | "kind" : "NON_NULL",
263 | "name" : null,
264 | "ofType" : {
265 | "kind" : "SCALAR",
266 | "name" : "String",
267 | "ofType" : null
268 | }
269 | },
270 | "isDeprecated" : false,
271 | "deprecationReason" : null
272 | }, {
273 | "name" : "postBody",
274 | "description" : null,
275 | "args" : [ ],
276 | "type" : {
277 | "kind" : "NON_NULL",
278 | "name" : null,
279 | "ofType" : {
280 | "kind" : "SCALAR",
281 | "name" : "String",
282 | "ofType" : null
283 | }
284 | },
285 | "isDeprecated" : false,
286 | "deprecationReason" : null
287 | }, {
288 | "name" : "createdAt",
289 | "description" : null,
290 | "args" : [ ],
291 | "type" : {
292 | "kind" : "SCALAR",
293 | "name" : "String",
294 | "ofType" : null
295 | },
296 | "isDeprecated" : false,
297 | "deprecationReason" : null
298 | }, {
299 | "name" : "comments",
300 | "description" : null,
301 | "args" : [ {
302 | "name" : "filter",
303 | "description" : null,
304 | "type" : {
305 | "kind" : "INPUT_OBJECT",
306 | "name" : "ModelCommentFilterInput",
307 | "ofType" : null
308 | },
309 | "defaultValue" : null
310 | }, {
311 | "name" : "sortDirection",
312 | "description" : null,
313 | "type" : {
314 | "kind" : "ENUM",
315 | "name" : "ModelSortDirection",
316 | "ofType" : null
317 | },
318 | "defaultValue" : null
319 | }, {
320 | "name" : "limit",
321 | "description" : null,
322 | "type" : {
323 | "kind" : "SCALAR",
324 | "name" : "Int",
325 | "ofType" : null
326 | },
327 | "defaultValue" : null
328 | }, {
329 | "name" : "nextToken",
330 | "description" : null,
331 | "type" : {
332 | "kind" : "SCALAR",
333 | "name" : "String",
334 | "ofType" : null
335 | },
336 | "defaultValue" : null
337 | } ],
338 | "type" : {
339 | "kind" : "OBJECT",
340 | "name" : "ModelCommentConnection",
341 | "ofType" : null
342 | },
343 | "isDeprecated" : false,
344 | "deprecationReason" : null
345 | }, {
346 | "name" : "likes",
347 | "description" : null,
348 | "args" : [ {
349 | "name" : "filter",
350 | "description" : null,
351 | "type" : {
352 | "kind" : "INPUT_OBJECT",
353 | "name" : "ModelLikeFilterInput",
354 | "ofType" : null
355 | },
356 | "defaultValue" : null
357 | }, {
358 | "name" : "sortDirection",
359 | "description" : null,
360 | "type" : {
361 | "kind" : "ENUM",
362 | "name" : "ModelSortDirection",
363 | "ofType" : null
364 | },
365 | "defaultValue" : null
366 | }, {
367 | "name" : "limit",
368 | "description" : null,
369 | "type" : {
370 | "kind" : "SCALAR",
371 | "name" : "Int",
372 | "ofType" : null
373 | },
374 | "defaultValue" : null
375 | }, {
376 | "name" : "nextToken",
377 | "description" : null,
378 | "type" : {
379 | "kind" : "SCALAR",
380 | "name" : "String",
381 | "ofType" : null
382 | },
383 | "defaultValue" : null
384 | } ],
385 | "type" : {
386 | "kind" : "OBJECT",
387 | "name" : "ModelLikeConnection",
388 | "ofType" : null
389 | },
390 | "isDeprecated" : false,
391 | "deprecationReason" : null
392 | } ],
393 | "inputFields" : null,
394 | "interfaces" : [ ],
395 | "enumValues" : null,
396 | "possibleTypes" : null
397 | }, {
398 | "kind" : "SCALAR",
399 | "name" : "ID",
400 | "description" : "Built-in ID",
401 | "fields" : null,
402 | "inputFields" : null,
403 | "interfaces" : null,
404 | "enumValues" : null,
405 | "possibleTypes" : null
406 | }, {
407 | "kind" : "SCALAR",
408 | "name" : "String",
409 | "description" : "Built-in String",
410 | "fields" : null,
411 | "inputFields" : null,
412 | "interfaces" : null,
413 | "enumValues" : null,
414 | "possibleTypes" : null
415 | }, {
416 | "kind" : "OBJECT",
417 | "name" : "ModelCommentConnection",
418 | "description" : null,
419 | "fields" : [ {
420 | "name" : "items",
421 | "description" : null,
422 | "args" : [ ],
423 | "type" : {
424 | "kind" : "LIST",
425 | "name" : null,
426 | "ofType" : {
427 | "kind" : "OBJECT",
428 | "name" : "Comment",
429 | "ofType" : null
430 | }
431 | },
432 | "isDeprecated" : false,
433 | "deprecationReason" : null
434 | }, {
435 | "name" : "nextToken",
436 | "description" : null,
437 | "args" : [ ],
438 | "type" : {
439 | "kind" : "SCALAR",
440 | "name" : "String",
441 | "ofType" : null
442 | },
443 | "isDeprecated" : false,
444 | "deprecationReason" : null
445 | } ],
446 | "inputFields" : null,
447 | "interfaces" : [ ],
448 | "enumValues" : null,
449 | "possibleTypes" : null
450 | }, {
451 | "kind" : "OBJECT",
452 | "name" : "Comment",
453 | "description" : null,
454 | "fields" : [ {
455 | "name" : "id",
456 | "description" : null,
457 | "args" : [ ],
458 | "type" : {
459 | "kind" : "NON_NULL",
460 | "name" : null,
461 | "ofType" : {
462 | "kind" : "SCALAR",
463 | "name" : "ID",
464 | "ofType" : null
465 | }
466 | },
467 | "isDeprecated" : false,
468 | "deprecationReason" : null
469 | }, {
470 | "name" : "commentOwnerId",
471 | "description" : null,
472 | "args" : [ ],
473 | "type" : {
474 | "kind" : "NON_NULL",
475 | "name" : null,
476 | "ofType" : {
477 | "kind" : "SCALAR",
478 | "name" : "String",
479 | "ofType" : null
480 | }
481 | },
482 | "isDeprecated" : false,
483 | "deprecationReason" : null
484 | }, {
485 | "name" : "commentOwnerUsername",
486 | "description" : null,
487 | "args" : [ ],
488 | "type" : {
489 | "kind" : "NON_NULL",
490 | "name" : null,
491 | "ofType" : {
492 | "kind" : "SCALAR",
493 | "name" : "String",
494 | "ofType" : null
495 | }
496 | },
497 | "isDeprecated" : false,
498 | "deprecationReason" : null
499 | }, {
500 | "name" : "post",
501 | "description" : null,
502 | "args" : [ ],
503 | "type" : {
504 | "kind" : "OBJECT",
505 | "name" : "Post",
506 | "ofType" : null
507 | },
508 | "isDeprecated" : false,
509 | "deprecationReason" : null
510 | }, {
511 | "name" : "content",
512 | "description" : null,
513 | "args" : [ ],
514 | "type" : {
515 | "kind" : "NON_NULL",
516 | "name" : null,
517 | "ofType" : {
518 | "kind" : "SCALAR",
519 | "name" : "String",
520 | "ofType" : null
521 | }
522 | },
523 | "isDeprecated" : false,
524 | "deprecationReason" : null
525 | }, {
526 | "name" : "createdAt",
527 | "description" : null,
528 | "args" : [ ],
529 | "type" : {
530 | "kind" : "NON_NULL",
531 | "name" : null,
532 | "ofType" : {
533 | "kind" : "SCALAR",
534 | "name" : "String",
535 | "ofType" : null
536 | }
537 | },
538 | "isDeprecated" : false,
539 | "deprecationReason" : null
540 | } ],
541 | "inputFields" : null,
542 | "interfaces" : [ ],
543 | "enumValues" : null,
544 | "possibleTypes" : null
545 | }, {
546 | "kind" : "INPUT_OBJECT",
547 | "name" : "ModelCommentFilterInput",
548 | "description" : null,
549 | "fields" : null,
550 | "inputFields" : [ {
551 | "name" : "id",
552 | "description" : null,
553 | "type" : {
554 | "kind" : "INPUT_OBJECT",
555 | "name" : "ModelIDFilterInput",
556 | "ofType" : null
557 | },
558 | "defaultValue" : null
559 | }, {
560 | "name" : "commentOwnerId",
561 | "description" : null,
562 | "type" : {
563 | "kind" : "INPUT_OBJECT",
564 | "name" : "ModelStringFilterInput",
565 | "ofType" : null
566 | },
567 | "defaultValue" : null
568 | }, {
569 | "name" : "commentOwnerUsername",
570 | "description" : null,
571 | "type" : {
572 | "kind" : "INPUT_OBJECT",
573 | "name" : "ModelStringFilterInput",
574 | "ofType" : null
575 | },
576 | "defaultValue" : null
577 | }, {
578 | "name" : "content",
579 | "description" : null,
580 | "type" : {
581 | "kind" : "INPUT_OBJECT",
582 | "name" : "ModelStringFilterInput",
583 | "ofType" : null
584 | },
585 | "defaultValue" : null
586 | }, {
587 | "name" : "createdAt",
588 | "description" : null,
589 | "type" : {
590 | "kind" : "INPUT_OBJECT",
591 | "name" : "ModelStringFilterInput",
592 | "ofType" : null
593 | },
594 | "defaultValue" : null
595 | }, {
596 | "name" : "and",
597 | "description" : null,
598 | "type" : {
599 | "kind" : "LIST",
600 | "name" : null,
601 | "ofType" : {
602 | "kind" : "INPUT_OBJECT",
603 | "name" : "ModelCommentFilterInput",
604 | "ofType" : null
605 | }
606 | },
607 | "defaultValue" : null
608 | }, {
609 | "name" : "or",
610 | "description" : null,
611 | "type" : {
612 | "kind" : "LIST",
613 | "name" : null,
614 | "ofType" : {
615 | "kind" : "INPUT_OBJECT",
616 | "name" : "ModelCommentFilterInput",
617 | "ofType" : null
618 | }
619 | },
620 | "defaultValue" : null
621 | }, {
622 | "name" : "not",
623 | "description" : null,
624 | "type" : {
625 | "kind" : "INPUT_OBJECT",
626 | "name" : "ModelCommentFilterInput",
627 | "ofType" : null
628 | },
629 | "defaultValue" : null
630 | } ],
631 | "interfaces" : null,
632 | "enumValues" : null,
633 | "possibleTypes" : null
634 | }, {
635 | "kind" : "INPUT_OBJECT",
636 | "name" : "ModelIDFilterInput",
637 | "description" : null,
638 | "fields" : null,
639 | "inputFields" : [ {
640 | "name" : "ne",
641 | "description" : null,
642 | "type" : {
643 | "kind" : "SCALAR",
644 | "name" : "ID",
645 | "ofType" : null
646 | },
647 | "defaultValue" : null
648 | }, {
649 | "name" : "eq",
650 | "description" : null,
651 | "type" : {
652 | "kind" : "SCALAR",
653 | "name" : "ID",
654 | "ofType" : null
655 | },
656 | "defaultValue" : null
657 | }, {
658 | "name" : "le",
659 | "description" : null,
660 | "type" : {
661 | "kind" : "SCALAR",
662 | "name" : "ID",
663 | "ofType" : null
664 | },
665 | "defaultValue" : null
666 | }, {
667 | "name" : "lt",
668 | "description" : null,
669 | "type" : {
670 | "kind" : "SCALAR",
671 | "name" : "ID",
672 | "ofType" : null
673 | },
674 | "defaultValue" : null
675 | }, {
676 | "name" : "ge",
677 | "description" : null,
678 | "type" : {
679 | "kind" : "SCALAR",
680 | "name" : "ID",
681 | "ofType" : null
682 | },
683 | "defaultValue" : null
684 | }, {
685 | "name" : "gt",
686 | "description" : null,
687 | "type" : {
688 | "kind" : "SCALAR",
689 | "name" : "ID",
690 | "ofType" : null
691 | },
692 | "defaultValue" : null
693 | }, {
694 | "name" : "contains",
695 | "description" : null,
696 | "type" : {
697 | "kind" : "SCALAR",
698 | "name" : "ID",
699 | "ofType" : null
700 | },
701 | "defaultValue" : null
702 | }, {
703 | "name" : "notContains",
704 | "description" : null,
705 | "type" : {
706 | "kind" : "SCALAR",
707 | "name" : "ID",
708 | "ofType" : null
709 | },
710 | "defaultValue" : null
711 | }, {
712 | "name" : "between",
713 | "description" : null,
714 | "type" : {
715 | "kind" : "LIST",
716 | "name" : null,
717 | "ofType" : {
718 | "kind" : "SCALAR",
719 | "name" : "ID",
720 | "ofType" : null
721 | }
722 | },
723 | "defaultValue" : null
724 | }, {
725 | "name" : "beginsWith",
726 | "description" : null,
727 | "type" : {
728 | "kind" : "SCALAR",
729 | "name" : "ID",
730 | "ofType" : null
731 | },
732 | "defaultValue" : null
733 | } ],
734 | "interfaces" : null,
735 | "enumValues" : null,
736 | "possibleTypes" : null
737 | }, {
738 | "kind" : "INPUT_OBJECT",
739 | "name" : "ModelStringFilterInput",
740 | "description" : null,
741 | "fields" : null,
742 | "inputFields" : [ {
743 | "name" : "ne",
744 | "description" : null,
745 | "type" : {
746 | "kind" : "SCALAR",
747 | "name" : "String",
748 | "ofType" : null
749 | },
750 | "defaultValue" : null
751 | }, {
752 | "name" : "eq",
753 | "description" : null,
754 | "type" : {
755 | "kind" : "SCALAR",
756 | "name" : "String",
757 | "ofType" : null
758 | },
759 | "defaultValue" : null
760 | }, {
761 | "name" : "le",
762 | "description" : null,
763 | "type" : {
764 | "kind" : "SCALAR",
765 | "name" : "String",
766 | "ofType" : null
767 | },
768 | "defaultValue" : null
769 | }, {
770 | "name" : "lt",
771 | "description" : null,
772 | "type" : {
773 | "kind" : "SCALAR",
774 | "name" : "String",
775 | "ofType" : null
776 | },
777 | "defaultValue" : null
778 | }, {
779 | "name" : "ge",
780 | "description" : null,
781 | "type" : {
782 | "kind" : "SCALAR",
783 | "name" : "String",
784 | "ofType" : null
785 | },
786 | "defaultValue" : null
787 | }, {
788 | "name" : "gt",
789 | "description" : null,
790 | "type" : {
791 | "kind" : "SCALAR",
792 | "name" : "String",
793 | "ofType" : null
794 | },
795 | "defaultValue" : null
796 | }, {
797 | "name" : "contains",
798 | "description" : null,
799 | "type" : {
800 | "kind" : "SCALAR",
801 | "name" : "String",
802 | "ofType" : null
803 | },
804 | "defaultValue" : null
805 | }, {
806 | "name" : "notContains",
807 | "description" : null,
808 | "type" : {
809 | "kind" : "SCALAR",
810 | "name" : "String",
811 | "ofType" : null
812 | },
813 | "defaultValue" : null
814 | }, {
815 | "name" : "between",
816 | "description" : null,
817 | "type" : {
818 | "kind" : "LIST",
819 | "name" : null,
820 | "ofType" : {
821 | "kind" : "SCALAR",
822 | "name" : "String",
823 | "ofType" : null
824 | }
825 | },
826 | "defaultValue" : null
827 | }, {
828 | "name" : "beginsWith",
829 | "description" : null,
830 | "type" : {
831 | "kind" : "SCALAR",
832 | "name" : "String",
833 | "ofType" : null
834 | },
835 | "defaultValue" : null
836 | } ],
837 | "interfaces" : null,
838 | "enumValues" : null,
839 | "possibleTypes" : null
840 | }, {
841 | "kind" : "ENUM",
842 | "name" : "ModelSortDirection",
843 | "description" : null,
844 | "fields" : null,
845 | "inputFields" : null,
846 | "interfaces" : null,
847 | "enumValues" : [ {
848 | "name" : "ASC",
849 | "description" : null,
850 | "isDeprecated" : false,
851 | "deprecationReason" : null
852 | }, {
853 | "name" : "DESC",
854 | "description" : null,
855 | "isDeprecated" : false,
856 | "deprecationReason" : null
857 | } ],
858 | "possibleTypes" : null
859 | }, {
860 | "kind" : "SCALAR",
861 | "name" : "Int",
862 | "description" : "Built-in Int",
863 | "fields" : null,
864 | "inputFields" : null,
865 | "interfaces" : null,
866 | "enumValues" : null,
867 | "possibleTypes" : null
868 | }, {
869 | "kind" : "OBJECT",
870 | "name" : "ModelLikeConnection",
871 | "description" : null,
872 | "fields" : [ {
873 | "name" : "items",
874 | "description" : null,
875 | "args" : [ ],
876 | "type" : {
877 | "kind" : "LIST",
878 | "name" : null,
879 | "ofType" : {
880 | "kind" : "OBJECT",
881 | "name" : "Like",
882 | "ofType" : null
883 | }
884 | },
885 | "isDeprecated" : false,
886 | "deprecationReason" : null
887 | }, {
888 | "name" : "nextToken",
889 | "description" : null,
890 | "args" : [ ],
891 | "type" : {
892 | "kind" : "SCALAR",
893 | "name" : "String",
894 | "ofType" : null
895 | },
896 | "isDeprecated" : false,
897 | "deprecationReason" : null
898 | } ],
899 | "inputFields" : null,
900 | "interfaces" : [ ],
901 | "enumValues" : null,
902 | "possibleTypes" : null
903 | }, {
904 | "kind" : "OBJECT",
905 | "name" : "Like",
906 | "description" : null,
907 | "fields" : [ {
908 | "name" : "id",
909 | "description" : null,
910 | "args" : [ ],
911 | "type" : {
912 | "kind" : "NON_NULL",
913 | "name" : null,
914 | "ofType" : {
915 | "kind" : "SCALAR",
916 | "name" : "ID",
917 | "ofType" : null
918 | }
919 | },
920 | "isDeprecated" : false,
921 | "deprecationReason" : null
922 | }, {
923 | "name" : "numberLikes",
924 | "description" : null,
925 | "args" : [ ],
926 | "type" : {
927 | "kind" : "NON_NULL",
928 | "name" : null,
929 | "ofType" : {
930 | "kind" : "SCALAR",
931 | "name" : "Int",
932 | "ofType" : null
933 | }
934 | },
935 | "isDeprecated" : false,
936 | "deprecationReason" : null
937 | }, {
938 | "name" : "likeOwnerId",
939 | "description" : null,
940 | "args" : [ ],
941 | "type" : {
942 | "kind" : "NON_NULL",
943 | "name" : null,
944 | "ofType" : {
945 | "kind" : "SCALAR",
946 | "name" : "String",
947 | "ofType" : null
948 | }
949 | },
950 | "isDeprecated" : false,
951 | "deprecationReason" : null
952 | }, {
953 | "name" : "likeOwnerUsername",
954 | "description" : null,
955 | "args" : [ ],
956 | "type" : {
957 | "kind" : "NON_NULL",
958 | "name" : null,
959 | "ofType" : {
960 | "kind" : "SCALAR",
961 | "name" : "String",
962 | "ofType" : null
963 | }
964 | },
965 | "isDeprecated" : false,
966 | "deprecationReason" : null
967 | }, {
968 | "name" : "post",
969 | "description" : null,
970 | "args" : [ ],
971 | "type" : {
972 | "kind" : "OBJECT",
973 | "name" : "Post",
974 | "ofType" : null
975 | },
976 | "isDeprecated" : false,
977 | "deprecationReason" : null
978 | } ],
979 | "inputFields" : null,
980 | "interfaces" : [ ],
981 | "enumValues" : null,
982 | "possibleTypes" : null
983 | }, {
984 | "kind" : "INPUT_OBJECT",
985 | "name" : "ModelLikeFilterInput",
986 | "description" : null,
987 | "fields" : null,
988 | "inputFields" : [ {
989 | "name" : "id",
990 | "description" : null,
991 | "type" : {
992 | "kind" : "INPUT_OBJECT",
993 | "name" : "ModelIDFilterInput",
994 | "ofType" : null
995 | },
996 | "defaultValue" : null
997 | }, {
998 | "name" : "numberLikes",
999 | "description" : null,
1000 | "type" : {
1001 | "kind" : "INPUT_OBJECT",
1002 | "name" : "ModelIntFilterInput",
1003 | "ofType" : null
1004 | },
1005 | "defaultValue" : null
1006 | }, {
1007 | "name" : "likeOwnerId",
1008 | "description" : null,
1009 | "type" : {
1010 | "kind" : "INPUT_OBJECT",
1011 | "name" : "ModelStringFilterInput",
1012 | "ofType" : null
1013 | },
1014 | "defaultValue" : null
1015 | }, {
1016 | "name" : "likeOwnerUsername",
1017 | "description" : null,
1018 | "type" : {
1019 | "kind" : "INPUT_OBJECT",
1020 | "name" : "ModelStringFilterInput",
1021 | "ofType" : null
1022 | },
1023 | "defaultValue" : null
1024 | }, {
1025 | "name" : "and",
1026 | "description" : null,
1027 | "type" : {
1028 | "kind" : "LIST",
1029 | "name" : null,
1030 | "ofType" : {
1031 | "kind" : "INPUT_OBJECT",
1032 | "name" : "ModelLikeFilterInput",
1033 | "ofType" : null
1034 | }
1035 | },
1036 | "defaultValue" : null
1037 | }, {
1038 | "name" : "or",
1039 | "description" : null,
1040 | "type" : {
1041 | "kind" : "LIST",
1042 | "name" : null,
1043 | "ofType" : {
1044 | "kind" : "INPUT_OBJECT",
1045 | "name" : "ModelLikeFilterInput",
1046 | "ofType" : null
1047 | }
1048 | },
1049 | "defaultValue" : null
1050 | }, {
1051 | "name" : "not",
1052 | "description" : null,
1053 | "type" : {
1054 | "kind" : "INPUT_OBJECT",
1055 | "name" : "ModelLikeFilterInput",
1056 | "ofType" : null
1057 | },
1058 | "defaultValue" : null
1059 | } ],
1060 | "interfaces" : null,
1061 | "enumValues" : null,
1062 | "possibleTypes" : null
1063 | }, {
1064 | "kind" : "INPUT_OBJECT",
1065 | "name" : "ModelIntFilterInput",
1066 | "description" : null,
1067 | "fields" : null,
1068 | "inputFields" : [ {
1069 | "name" : "ne",
1070 | "description" : null,
1071 | "type" : {
1072 | "kind" : "SCALAR",
1073 | "name" : "Int",
1074 | "ofType" : null
1075 | },
1076 | "defaultValue" : null
1077 | }, {
1078 | "name" : "eq",
1079 | "description" : null,
1080 | "type" : {
1081 | "kind" : "SCALAR",
1082 | "name" : "Int",
1083 | "ofType" : null
1084 | },
1085 | "defaultValue" : null
1086 | }, {
1087 | "name" : "le",
1088 | "description" : null,
1089 | "type" : {
1090 | "kind" : "SCALAR",
1091 | "name" : "Int",
1092 | "ofType" : null
1093 | },
1094 | "defaultValue" : null
1095 | }, {
1096 | "name" : "lt",
1097 | "description" : null,
1098 | "type" : {
1099 | "kind" : "SCALAR",
1100 | "name" : "Int",
1101 | "ofType" : null
1102 | },
1103 | "defaultValue" : null
1104 | }, {
1105 | "name" : "ge",
1106 | "description" : null,
1107 | "type" : {
1108 | "kind" : "SCALAR",
1109 | "name" : "Int",
1110 | "ofType" : null
1111 | },
1112 | "defaultValue" : null
1113 | }, {
1114 | "name" : "gt",
1115 | "description" : null,
1116 | "type" : {
1117 | "kind" : "SCALAR",
1118 | "name" : "Int",
1119 | "ofType" : null
1120 | },
1121 | "defaultValue" : null
1122 | }, {
1123 | "name" : "contains",
1124 | "description" : null,
1125 | "type" : {
1126 | "kind" : "SCALAR",
1127 | "name" : "Int",
1128 | "ofType" : null
1129 | },
1130 | "defaultValue" : null
1131 | }, {
1132 | "name" : "notContains",
1133 | "description" : null,
1134 | "type" : {
1135 | "kind" : "SCALAR",
1136 | "name" : "Int",
1137 | "ofType" : null
1138 | },
1139 | "defaultValue" : null
1140 | }, {
1141 | "name" : "between",
1142 | "description" : null,
1143 | "type" : {
1144 | "kind" : "LIST",
1145 | "name" : null,
1146 | "ofType" : {
1147 | "kind" : "SCALAR",
1148 | "name" : "Int",
1149 | "ofType" : null
1150 | }
1151 | },
1152 | "defaultValue" : null
1153 | } ],
1154 | "interfaces" : null,
1155 | "enumValues" : null,
1156 | "possibleTypes" : null
1157 | }, {
1158 | "kind" : "OBJECT",
1159 | "name" : "ModelPostConnection",
1160 | "description" : null,
1161 | "fields" : [ {
1162 | "name" : "items",
1163 | "description" : null,
1164 | "args" : [ ],
1165 | "type" : {
1166 | "kind" : "LIST",
1167 | "name" : null,
1168 | "ofType" : {
1169 | "kind" : "OBJECT",
1170 | "name" : "Post",
1171 | "ofType" : null
1172 | }
1173 | },
1174 | "isDeprecated" : false,
1175 | "deprecationReason" : null
1176 | }, {
1177 | "name" : "nextToken",
1178 | "description" : null,
1179 | "args" : [ ],
1180 | "type" : {
1181 | "kind" : "SCALAR",
1182 | "name" : "String",
1183 | "ofType" : null
1184 | },
1185 | "isDeprecated" : false,
1186 | "deprecationReason" : null
1187 | } ],
1188 | "inputFields" : null,
1189 | "interfaces" : [ ],
1190 | "enumValues" : null,
1191 | "possibleTypes" : null
1192 | }, {
1193 | "kind" : "INPUT_OBJECT",
1194 | "name" : "ModelPostFilterInput",
1195 | "description" : null,
1196 | "fields" : null,
1197 | "inputFields" : [ {
1198 | "name" : "id",
1199 | "description" : null,
1200 | "type" : {
1201 | "kind" : "INPUT_OBJECT",
1202 | "name" : "ModelIDFilterInput",
1203 | "ofType" : null
1204 | },
1205 | "defaultValue" : null
1206 | }, {
1207 | "name" : "postOwnerId",
1208 | "description" : null,
1209 | "type" : {
1210 | "kind" : "INPUT_OBJECT",
1211 | "name" : "ModelStringFilterInput",
1212 | "ofType" : null
1213 | },
1214 | "defaultValue" : null
1215 | }, {
1216 | "name" : "postOwnerUsername",
1217 | "description" : null,
1218 | "type" : {
1219 | "kind" : "INPUT_OBJECT",
1220 | "name" : "ModelStringFilterInput",
1221 | "ofType" : null
1222 | },
1223 | "defaultValue" : null
1224 | }, {
1225 | "name" : "postTitle",
1226 | "description" : null,
1227 | "type" : {
1228 | "kind" : "INPUT_OBJECT",
1229 | "name" : "ModelStringFilterInput",
1230 | "ofType" : null
1231 | },
1232 | "defaultValue" : null
1233 | }, {
1234 | "name" : "postBody",
1235 | "description" : null,
1236 | "type" : {
1237 | "kind" : "INPUT_OBJECT",
1238 | "name" : "ModelStringFilterInput",
1239 | "ofType" : null
1240 | },
1241 | "defaultValue" : null
1242 | }, {
1243 | "name" : "createdAt",
1244 | "description" : null,
1245 | "type" : {
1246 | "kind" : "INPUT_OBJECT",
1247 | "name" : "ModelStringFilterInput",
1248 | "ofType" : null
1249 | },
1250 | "defaultValue" : null
1251 | }, {
1252 | "name" : "and",
1253 | "description" : null,
1254 | "type" : {
1255 | "kind" : "LIST",
1256 | "name" : null,
1257 | "ofType" : {
1258 | "kind" : "INPUT_OBJECT",
1259 | "name" : "ModelPostFilterInput",
1260 | "ofType" : null
1261 | }
1262 | },
1263 | "defaultValue" : null
1264 | }, {
1265 | "name" : "or",
1266 | "description" : null,
1267 | "type" : {
1268 | "kind" : "LIST",
1269 | "name" : null,
1270 | "ofType" : {
1271 | "kind" : "INPUT_OBJECT",
1272 | "name" : "ModelPostFilterInput",
1273 | "ofType" : null
1274 | }
1275 | },
1276 | "defaultValue" : null
1277 | }, {
1278 | "name" : "not",
1279 | "description" : null,
1280 | "type" : {
1281 | "kind" : "INPUT_OBJECT",
1282 | "name" : "ModelPostFilterInput",
1283 | "ofType" : null
1284 | },
1285 | "defaultValue" : null
1286 | } ],
1287 | "interfaces" : null,
1288 | "enumValues" : null,
1289 | "possibleTypes" : null
1290 | }, {
1291 | "kind" : "OBJECT",
1292 | "name" : "Mutation",
1293 | "description" : null,
1294 | "fields" : [ {
1295 | "name" : "createPost",
1296 | "description" : null,
1297 | "args" : [ {
1298 | "name" : "input",
1299 | "description" : null,
1300 | "type" : {
1301 | "kind" : "NON_NULL",
1302 | "name" : null,
1303 | "ofType" : {
1304 | "kind" : "INPUT_OBJECT",
1305 | "name" : "CreatePostInput",
1306 | "ofType" : null
1307 | }
1308 | },
1309 | "defaultValue" : null
1310 | } ],
1311 | "type" : {
1312 | "kind" : "OBJECT",
1313 | "name" : "Post",
1314 | "ofType" : null
1315 | },
1316 | "isDeprecated" : false,
1317 | "deprecationReason" : null
1318 | }, {
1319 | "name" : "updatePost",
1320 | "description" : null,
1321 | "args" : [ {
1322 | "name" : "input",
1323 | "description" : null,
1324 | "type" : {
1325 | "kind" : "NON_NULL",
1326 | "name" : null,
1327 | "ofType" : {
1328 | "kind" : "INPUT_OBJECT",
1329 | "name" : "UpdatePostInput",
1330 | "ofType" : null
1331 | }
1332 | },
1333 | "defaultValue" : null
1334 | } ],
1335 | "type" : {
1336 | "kind" : "OBJECT",
1337 | "name" : "Post",
1338 | "ofType" : null
1339 | },
1340 | "isDeprecated" : false,
1341 | "deprecationReason" : null
1342 | }, {
1343 | "name" : "deletePost",
1344 | "description" : null,
1345 | "args" : [ {
1346 | "name" : "input",
1347 | "description" : null,
1348 | "type" : {
1349 | "kind" : "NON_NULL",
1350 | "name" : null,
1351 | "ofType" : {
1352 | "kind" : "INPUT_OBJECT",
1353 | "name" : "DeletePostInput",
1354 | "ofType" : null
1355 | }
1356 | },
1357 | "defaultValue" : null
1358 | } ],
1359 | "type" : {
1360 | "kind" : "OBJECT",
1361 | "name" : "Post",
1362 | "ofType" : null
1363 | },
1364 | "isDeprecated" : false,
1365 | "deprecationReason" : null
1366 | }, {
1367 | "name" : "createComment",
1368 | "description" : null,
1369 | "args" : [ {
1370 | "name" : "input",
1371 | "description" : null,
1372 | "type" : {
1373 | "kind" : "NON_NULL",
1374 | "name" : null,
1375 | "ofType" : {
1376 | "kind" : "INPUT_OBJECT",
1377 | "name" : "CreateCommentInput",
1378 | "ofType" : null
1379 | }
1380 | },
1381 | "defaultValue" : null
1382 | } ],
1383 | "type" : {
1384 | "kind" : "OBJECT",
1385 | "name" : "Comment",
1386 | "ofType" : null
1387 | },
1388 | "isDeprecated" : false,
1389 | "deprecationReason" : null
1390 | }, {
1391 | "name" : "updateComment",
1392 | "description" : null,
1393 | "args" : [ {
1394 | "name" : "input",
1395 | "description" : null,
1396 | "type" : {
1397 | "kind" : "NON_NULL",
1398 | "name" : null,
1399 | "ofType" : {
1400 | "kind" : "INPUT_OBJECT",
1401 | "name" : "UpdateCommentInput",
1402 | "ofType" : null
1403 | }
1404 | },
1405 | "defaultValue" : null
1406 | } ],
1407 | "type" : {
1408 | "kind" : "OBJECT",
1409 | "name" : "Comment",
1410 | "ofType" : null
1411 | },
1412 | "isDeprecated" : false,
1413 | "deprecationReason" : null
1414 | }, {
1415 | "name" : "deleteComment",
1416 | "description" : null,
1417 | "args" : [ {
1418 | "name" : "input",
1419 | "description" : null,
1420 | "type" : {
1421 | "kind" : "NON_NULL",
1422 | "name" : null,
1423 | "ofType" : {
1424 | "kind" : "INPUT_OBJECT",
1425 | "name" : "DeleteCommentInput",
1426 | "ofType" : null
1427 | }
1428 | },
1429 | "defaultValue" : null
1430 | } ],
1431 | "type" : {
1432 | "kind" : "OBJECT",
1433 | "name" : "Comment",
1434 | "ofType" : null
1435 | },
1436 | "isDeprecated" : false,
1437 | "deprecationReason" : null
1438 | }, {
1439 | "name" : "createLike",
1440 | "description" : null,
1441 | "args" : [ {
1442 | "name" : "input",
1443 | "description" : null,
1444 | "type" : {
1445 | "kind" : "NON_NULL",
1446 | "name" : null,
1447 | "ofType" : {
1448 | "kind" : "INPUT_OBJECT",
1449 | "name" : "CreateLikeInput",
1450 | "ofType" : null
1451 | }
1452 | },
1453 | "defaultValue" : null
1454 | } ],
1455 | "type" : {
1456 | "kind" : "OBJECT",
1457 | "name" : "Like",
1458 | "ofType" : null
1459 | },
1460 | "isDeprecated" : false,
1461 | "deprecationReason" : null
1462 | }, {
1463 | "name" : "updateLike",
1464 | "description" : null,
1465 | "args" : [ {
1466 | "name" : "input",
1467 | "description" : null,
1468 | "type" : {
1469 | "kind" : "NON_NULL",
1470 | "name" : null,
1471 | "ofType" : {
1472 | "kind" : "INPUT_OBJECT",
1473 | "name" : "UpdateLikeInput",
1474 | "ofType" : null
1475 | }
1476 | },
1477 | "defaultValue" : null
1478 | } ],
1479 | "type" : {
1480 | "kind" : "OBJECT",
1481 | "name" : "Like",
1482 | "ofType" : null
1483 | },
1484 | "isDeprecated" : false,
1485 | "deprecationReason" : null
1486 | }, {
1487 | "name" : "deleteLike",
1488 | "description" : null,
1489 | "args" : [ {
1490 | "name" : "input",
1491 | "description" : null,
1492 | "type" : {
1493 | "kind" : "NON_NULL",
1494 | "name" : null,
1495 | "ofType" : {
1496 | "kind" : "INPUT_OBJECT",
1497 | "name" : "DeleteLikeInput",
1498 | "ofType" : null
1499 | }
1500 | },
1501 | "defaultValue" : null
1502 | } ],
1503 | "type" : {
1504 | "kind" : "OBJECT",
1505 | "name" : "Like",
1506 | "ofType" : null
1507 | },
1508 | "isDeprecated" : false,
1509 | "deprecationReason" : null
1510 | } ],
1511 | "inputFields" : null,
1512 | "interfaces" : [ ],
1513 | "enumValues" : null,
1514 | "possibleTypes" : null
1515 | }, {
1516 | "kind" : "INPUT_OBJECT",
1517 | "name" : "CreatePostInput",
1518 | "description" : null,
1519 | "fields" : null,
1520 | "inputFields" : [ {
1521 | "name" : "id",
1522 | "description" : null,
1523 | "type" : {
1524 | "kind" : "SCALAR",
1525 | "name" : "ID",
1526 | "ofType" : null
1527 | },
1528 | "defaultValue" : null
1529 | }, {
1530 | "name" : "postOwnerId",
1531 | "description" : null,
1532 | "type" : {
1533 | "kind" : "NON_NULL",
1534 | "name" : null,
1535 | "ofType" : {
1536 | "kind" : "SCALAR",
1537 | "name" : "String",
1538 | "ofType" : null
1539 | }
1540 | },
1541 | "defaultValue" : null
1542 | }, {
1543 | "name" : "postOwnerUsername",
1544 | "description" : null,
1545 | "type" : {
1546 | "kind" : "NON_NULL",
1547 | "name" : null,
1548 | "ofType" : {
1549 | "kind" : "SCALAR",
1550 | "name" : "String",
1551 | "ofType" : null
1552 | }
1553 | },
1554 | "defaultValue" : null
1555 | }, {
1556 | "name" : "postTitle",
1557 | "description" : null,
1558 | "type" : {
1559 | "kind" : "NON_NULL",
1560 | "name" : null,
1561 | "ofType" : {
1562 | "kind" : "SCALAR",
1563 | "name" : "String",
1564 | "ofType" : null
1565 | }
1566 | },
1567 | "defaultValue" : null
1568 | }, {
1569 | "name" : "postBody",
1570 | "description" : null,
1571 | "type" : {
1572 | "kind" : "NON_NULL",
1573 | "name" : null,
1574 | "ofType" : {
1575 | "kind" : "SCALAR",
1576 | "name" : "String",
1577 | "ofType" : null
1578 | }
1579 | },
1580 | "defaultValue" : null
1581 | }, {
1582 | "name" : "createdAt",
1583 | "description" : null,
1584 | "type" : {
1585 | "kind" : "SCALAR",
1586 | "name" : "String",
1587 | "ofType" : null
1588 | },
1589 | "defaultValue" : null
1590 | } ],
1591 | "interfaces" : null,
1592 | "enumValues" : null,
1593 | "possibleTypes" : null
1594 | }, {
1595 | "kind" : "INPUT_OBJECT",
1596 | "name" : "UpdatePostInput",
1597 | "description" : null,
1598 | "fields" : null,
1599 | "inputFields" : [ {
1600 | "name" : "id",
1601 | "description" : null,
1602 | "type" : {
1603 | "kind" : "NON_NULL",
1604 | "name" : null,
1605 | "ofType" : {
1606 | "kind" : "SCALAR",
1607 | "name" : "ID",
1608 | "ofType" : null
1609 | }
1610 | },
1611 | "defaultValue" : null
1612 | }, {
1613 | "name" : "postOwnerId",
1614 | "description" : null,
1615 | "type" : {
1616 | "kind" : "SCALAR",
1617 | "name" : "String",
1618 | "ofType" : null
1619 | },
1620 | "defaultValue" : null
1621 | }, {
1622 | "name" : "postOwnerUsername",
1623 | "description" : null,
1624 | "type" : {
1625 | "kind" : "SCALAR",
1626 | "name" : "String",
1627 | "ofType" : null
1628 | },
1629 | "defaultValue" : null
1630 | }, {
1631 | "name" : "postTitle",
1632 | "description" : null,
1633 | "type" : {
1634 | "kind" : "SCALAR",
1635 | "name" : "String",
1636 | "ofType" : null
1637 | },
1638 | "defaultValue" : null
1639 | }, {
1640 | "name" : "postBody",
1641 | "description" : null,
1642 | "type" : {
1643 | "kind" : "SCALAR",
1644 | "name" : "String",
1645 | "ofType" : null
1646 | },
1647 | "defaultValue" : null
1648 | }, {
1649 | "name" : "createdAt",
1650 | "description" : null,
1651 | "type" : {
1652 | "kind" : "SCALAR",
1653 | "name" : "String",
1654 | "ofType" : null
1655 | },
1656 | "defaultValue" : null
1657 | } ],
1658 | "interfaces" : null,
1659 | "enumValues" : null,
1660 | "possibleTypes" : null
1661 | }, {
1662 | "kind" : "INPUT_OBJECT",
1663 | "name" : "DeletePostInput",
1664 | "description" : null,
1665 | "fields" : null,
1666 | "inputFields" : [ {
1667 | "name" : "id",
1668 | "description" : null,
1669 | "type" : {
1670 | "kind" : "SCALAR",
1671 | "name" : "ID",
1672 | "ofType" : null
1673 | },
1674 | "defaultValue" : null
1675 | } ],
1676 | "interfaces" : null,
1677 | "enumValues" : null,
1678 | "possibleTypes" : null
1679 | }, {
1680 | "kind" : "INPUT_OBJECT",
1681 | "name" : "CreateCommentInput",
1682 | "description" : null,
1683 | "fields" : null,
1684 | "inputFields" : [ {
1685 | "name" : "id",
1686 | "description" : null,
1687 | "type" : {
1688 | "kind" : "SCALAR",
1689 | "name" : "ID",
1690 | "ofType" : null
1691 | },
1692 | "defaultValue" : null
1693 | }, {
1694 | "name" : "commentOwnerId",
1695 | "description" : null,
1696 | "type" : {
1697 | "kind" : "NON_NULL",
1698 | "name" : null,
1699 | "ofType" : {
1700 | "kind" : "SCALAR",
1701 | "name" : "String",
1702 | "ofType" : null
1703 | }
1704 | },
1705 | "defaultValue" : null
1706 | }, {
1707 | "name" : "commentOwnerUsername",
1708 | "description" : null,
1709 | "type" : {
1710 | "kind" : "NON_NULL",
1711 | "name" : null,
1712 | "ofType" : {
1713 | "kind" : "SCALAR",
1714 | "name" : "String",
1715 | "ofType" : null
1716 | }
1717 | },
1718 | "defaultValue" : null
1719 | }, {
1720 | "name" : "content",
1721 | "description" : null,
1722 | "type" : {
1723 | "kind" : "NON_NULL",
1724 | "name" : null,
1725 | "ofType" : {
1726 | "kind" : "SCALAR",
1727 | "name" : "String",
1728 | "ofType" : null
1729 | }
1730 | },
1731 | "defaultValue" : null
1732 | }, {
1733 | "name" : "createdAt",
1734 | "description" : null,
1735 | "type" : {
1736 | "kind" : "NON_NULL",
1737 | "name" : null,
1738 | "ofType" : {
1739 | "kind" : "SCALAR",
1740 | "name" : "String",
1741 | "ofType" : null
1742 | }
1743 | },
1744 | "defaultValue" : null
1745 | }, {
1746 | "name" : "commentPostId",
1747 | "description" : null,
1748 | "type" : {
1749 | "kind" : "SCALAR",
1750 | "name" : "ID",
1751 | "ofType" : null
1752 | },
1753 | "defaultValue" : null
1754 | } ],
1755 | "interfaces" : null,
1756 | "enumValues" : null,
1757 | "possibleTypes" : null
1758 | }, {
1759 | "kind" : "INPUT_OBJECT",
1760 | "name" : "UpdateCommentInput",
1761 | "description" : null,
1762 | "fields" : null,
1763 | "inputFields" : [ {
1764 | "name" : "id",
1765 | "description" : null,
1766 | "type" : {
1767 | "kind" : "NON_NULL",
1768 | "name" : null,
1769 | "ofType" : {
1770 | "kind" : "SCALAR",
1771 | "name" : "ID",
1772 | "ofType" : null
1773 | }
1774 | },
1775 | "defaultValue" : null
1776 | }, {
1777 | "name" : "commentOwnerId",
1778 | "description" : null,
1779 | "type" : {
1780 | "kind" : "SCALAR",
1781 | "name" : "String",
1782 | "ofType" : null
1783 | },
1784 | "defaultValue" : null
1785 | }, {
1786 | "name" : "commentOwnerUsername",
1787 | "description" : null,
1788 | "type" : {
1789 | "kind" : "SCALAR",
1790 | "name" : "String",
1791 | "ofType" : null
1792 | },
1793 | "defaultValue" : null
1794 | }, {
1795 | "name" : "content",
1796 | "description" : null,
1797 | "type" : {
1798 | "kind" : "SCALAR",
1799 | "name" : "String",
1800 | "ofType" : null
1801 | },
1802 | "defaultValue" : null
1803 | }, {
1804 | "name" : "createdAt",
1805 | "description" : null,
1806 | "type" : {
1807 | "kind" : "SCALAR",
1808 | "name" : "String",
1809 | "ofType" : null
1810 | },
1811 | "defaultValue" : null
1812 | }, {
1813 | "name" : "commentPostId",
1814 | "description" : null,
1815 | "type" : {
1816 | "kind" : "SCALAR",
1817 | "name" : "ID",
1818 | "ofType" : null
1819 | },
1820 | "defaultValue" : null
1821 | } ],
1822 | "interfaces" : null,
1823 | "enumValues" : null,
1824 | "possibleTypes" : null
1825 | }, {
1826 | "kind" : "INPUT_OBJECT",
1827 | "name" : "DeleteCommentInput",
1828 | "description" : null,
1829 | "fields" : null,
1830 | "inputFields" : [ {
1831 | "name" : "id",
1832 | "description" : null,
1833 | "type" : {
1834 | "kind" : "SCALAR",
1835 | "name" : "ID",
1836 | "ofType" : null
1837 | },
1838 | "defaultValue" : null
1839 | } ],
1840 | "interfaces" : null,
1841 | "enumValues" : null,
1842 | "possibleTypes" : null
1843 | }, {
1844 | "kind" : "INPUT_OBJECT",
1845 | "name" : "CreateLikeInput",
1846 | "description" : null,
1847 | "fields" : null,
1848 | "inputFields" : [ {
1849 | "name" : "id",
1850 | "description" : null,
1851 | "type" : {
1852 | "kind" : "SCALAR",
1853 | "name" : "ID",
1854 | "ofType" : null
1855 | },
1856 | "defaultValue" : null
1857 | }, {
1858 | "name" : "numberLikes",
1859 | "description" : null,
1860 | "type" : {
1861 | "kind" : "NON_NULL",
1862 | "name" : null,
1863 | "ofType" : {
1864 | "kind" : "SCALAR",
1865 | "name" : "Int",
1866 | "ofType" : null
1867 | }
1868 | },
1869 | "defaultValue" : null
1870 | }, {
1871 | "name" : "likeOwnerId",
1872 | "description" : null,
1873 | "type" : {
1874 | "kind" : "NON_NULL",
1875 | "name" : null,
1876 | "ofType" : {
1877 | "kind" : "SCALAR",
1878 | "name" : "String",
1879 | "ofType" : null
1880 | }
1881 | },
1882 | "defaultValue" : null
1883 | }, {
1884 | "name" : "likeOwnerUsername",
1885 | "description" : null,
1886 | "type" : {
1887 | "kind" : "NON_NULL",
1888 | "name" : null,
1889 | "ofType" : {
1890 | "kind" : "SCALAR",
1891 | "name" : "String",
1892 | "ofType" : null
1893 | }
1894 | },
1895 | "defaultValue" : null
1896 | }, {
1897 | "name" : "likePostId",
1898 | "description" : null,
1899 | "type" : {
1900 | "kind" : "SCALAR",
1901 | "name" : "ID",
1902 | "ofType" : null
1903 | },
1904 | "defaultValue" : null
1905 | } ],
1906 | "interfaces" : null,
1907 | "enumValues" : null,
1908 | "possibleTypes" : null
1909 | }, {
1910 | "kind" : "INPUT_OBJECT",
1911 | "name" : "UpdateLikeInput",
1912 | "description" : null,
1913 | "fields" : null,
1914 | "inputFields" : [ {
1915 | "name" : "id",
1916 | "description" : null,
1917 | "type" : {
1918 | "kind" : "NON_NULL",
1919 | "name" : null,
1920 | "ofType" : {
1921 | "kind" : "SCALAR",
1922 | "name" : "ID",
1923 | "ofType" : null
1924 | }
1925 | },
1926 | "defaultValue" : null
1927 | }, {
1928 | "name" : "numberLikes",
1929 | "description" : null,
1930 | "type" : {
1931 | "kind" : "SCALAR",
1932 | "name" : "Int",
1933 | "ofType" : null
1934 | },
1935 | "defaultValue" : null
1936 | }, {
1937 | "name" : "likeOwnerId",
1938 | "description" : null,
1939 | "type" : {
1940 | "kind" : "SCALAR",
1941 | "name" : "String",
1942 | "ofType" : null
1943 | },
1944 | "defaultValue" : null
1945 | }, {
1946 | "name" : "likeOwnerUsername",
1947 | "description" : null,
1948 | "type" : {
1949 | "kind" : "SCALAR",
1950 | "name" : "String",
1951 | "ofType" : null
1952 | },
1953 | "defaultValue" : null
1954 | }, {
1955 | "name" : "likePostId",
1956 | "description" : null,
1957 | "type" : {
1958 | "kind" : "SCALAR",
1959 | "name" : "ID",
1960 | "ofType" : null
1961 | },
1962 | "defaultValue" : null
1963 | } ],
1964 | "interfaces" : null,
1965 | "enumValues" : null,
1966 | "possibleTypes" : null
1967 | }, {
1968 | "kind" : "INPUT_OBJECT",
1969 | "name" : "DeleteLikeInput",
1970 | "description" : null,
1971 | "fields" : null,
1972 | "inputFields" : [ {
1973 | "name" : "id",
1974 | "description" : null,
1975 | "type" : {
1976 | "kind" : "SCALAR",
1977 | "name" : "ID",
1978 | "ofType" : null
1979 | },
1980 | "defaultValue" : null
1981 | } ],
1982 | "interfaces" : null,
1983 | "enumValues" : null,
1984 | "possibleTypes" : null
1985 | }, {
1986 | "kind" : "OBJECT",
1987 | "name" : "Subscription",
1988 | "description" : null,
1989 | "fields" : [ {
1990 | "name" : "onCreatePost",
1991 | "description" : null,
1992 | "args" : [ ],
1993 | "type" : {
1994 | "kind" : "OBJECT",
1995 | "name" : "Post",
1996 | "ofType" : null
1997 | },
1998 | "isDeprecated" : false,
1999 | "deprecationReason" : null
2000 | }, {
2001 | "name" : "onUpdatePost",
2002 | "description" : null,
2003 | "args" : [ ],
2004 | "type" : {
2005 | "kind" : "OBJECT",
2006 | "name" : "Post",
2007 | "ofType" : null
2008 | },
2009 | "isDeprecated" : false,
2010 | "deprecationReason" : null
2011 | }, {
2012 | "name" : "onDeletePost",
2013 | "description" : null,
2014 | "args" : [ ],
2015 | "type" : {
2016 | "kind" : "OBJECT",
2017 | "name" : "Post",
2018 | "ofType" : null
2019 | },
2020 | "isDeprecated" : false,
2021 | "deprecationReason" : null
2022 | }, {
2023 | "name" : "onCreateComment",
2024 | "description" : null,
2025 | "args" : [ ],
2026 | "type" : {
2027 | "kind" : "OBJECT",
2028 | "name" : "Comment",
2029 | "ofType" : null
2030 | },
2031 | "isDeprecated" : false,
2032 | "deprecationReason" : null
2033 | }, {
2034 | "name" : "onUpdateComment",
2035 | "description" : null,
2036 | "args" : [ ],
2037 | "type" : {
2038 | "kind" : "OBJECT",
2039 | "name" : "Comment",
2040 | "ofType" : null
2041 | },
2042 | "isDeprecated" : false,
2043 | "deprecationReason" : null
2044 | }, {
2045 | "name" : "onDeleteComment",
2046 | "description" : null,
2047 | "args" : [ ],
2048 | "type" : {
2049 | "kind" : "OBJECT",
2050 | "name" : "Comment",
2051 | "ofType" : null
2052 | },
2053 | "isDeprecated" : false,
2054 | "deprecationReason" : null
2055 | }, {
2056 | "name" : "onCreateLike",
2057 | "description" : null,
2058 | "args" : [ ],
2059 | "type" : {
2060 | "kind" : "OBJECT",
2061 | "name" : "Like",
2062 | "ofType" : null
2063 | },
2064 | "isDeprecated" : false,
2065 | "deprecationReason" : null
2066 | }, {
2067 | "name" : "onUpdateLike",
2068 | "description" : null,
2069 | "args" : [ ],
2070 | "type" : {
2071 | "kind" : "OBJECT",
2072 | "name" : "Like",
2073 | "ofType" : null
2074 | },
2075 | "isDeprecated" : false,
2076 | "deprecationReason" : null
2077 | }, {
2078 | "name" : "onDeleteLike",
2079 | "description" : null,
2080 | "args" : [ ],
2081 | "type" : {
2082 | "kind" : "OBJECT",
2083 | "name" : "Like",
2084 | "ofType" : null
2085 | },
2086 | "isDeprecated" : false,
2087 | "deprecationReason" : null
2088 | } ],
2089 | "inputFields" : null,
2090 | "interfaces" : [ ],
2091 | "enumValues" : null,
2092 | "possibleTypes" : null
2093 | }, {
2094 | "kind" : "INPUT_OBJECT",
2095 | "name" : "ModelBooleanFilterInput",
2096 | "description" : null,
2097 | "fields" : null,
2098 | "inputFields" : [ {
2099 | "name" : "ne",
2100 | "description" : null,
2101 | "type" : {
2102 | "kind" : "SCALAR",
2103 | "name" : "Boolean",
2104 | "ofType" : null
2105 | },
2106 | "defaultValue" : null
2107 | }, {
2108 | "name" : "eq",
2109 | "description" : null,
2110 | "type" : {
2111 | "kind" : "SCALAR",
2112 | "name" : "Boolean",
2113 | "ofType" : null
2114 | },
2115 | "defaultValue" : null
2116 | } ],
2117 | "interfaces" : null,
2118 | "enumValues" : null,
2119 | "possibleTypes" : null
2120 | }, {
2121 | "kind" : "SCALAR",
2122 | "name" : "Boolean",
2123 | "description" : "Built-in Boolean",
2124 | "fields" : null,
2125 | "inputFields" : null,
2126 | "interfaces" : null,
2127 | "enumValues" : null,
2128 | "possibleTypes" : null
2129 | }, {
2130 | "kind" : "INPUT_OBJECT",
2131 | "name" : "ModelFloatFilterInput",
2132 | "description" : null,
2133 | "fields" : null,
2134 | "inputFields" : [ {
2135 | "name" : "ne",
2136 | "description" : null,
2137 | "type" : {
2138 | "kind" : "SCALAR",
2139 | "name" : "Float",
2140 | "ofType" : null
2141 | },
2142 | "defaultValue" : null
2143 | }, {
2144 | "name" : "eq",
2145 | "description" : null,
2146 | "type" : {
2147 | "kind" : "SCALAR",
2148 | "name" : "Float",
2149 | "ofType" : null
2150 | },
2151 | "defaultValue" : null
2152 | }, {
2153 | "name" : "le",
2154 | "description" : null,
2155 | "type" : {
2156 | "kind" : "SCALAR",
2157 | "name" : "Float",
2158 | "ofType" : null
2159 | },
2160 | "defaultValue" : null
2161 | }, {
2162 | "name" : "lt",
2163 | "description" : null,
2164 | "type" : {
2165 | "kind" : "SCALAR",
2166 | "name" : "Float",
2167 | "ofType" : null
2168 | },
2169 | "defaultValue" : null
2170 | }, {
2171 | "name" : "ge",
2172 | "description" : null,
2173 | "type" : {
2174 | "kind" : "SCALAR",
2175 | "name" : "Float",
2176 | "ofType" : null
2177 | },
2178 | "defaultValue" : null
2179 | }, {
2180 | "name" : "gt",
2181 | "description" : null,
2182 | "type" : {
2183 | "kind" : "SCALAR",
2184 | "name" : "Float",
2185 | "ofType" : null
2186 | },
2187 | "defaultValue" : null
2188 | }, {
2189 | "name" : "contains",
2190 | "description" : null,
2191 | "type" : {
2192 | "kind" : "SCALAR",
2193 | "name" : "Float",
2194 | "ofType" : null
2195 | },
2196 | "defaultValue" : null
2197 | }, {
2198 | "name" : "notContains",
2199 | "description" : null,
2200 | "type" : {
2201 | "kind" : "SCALAR",
2202 | "name" : "Float",
2203 | "ofType" : null
2204 | },
2205 | "defaultValue" : null
2206 | }, {
2207 | "name" : "between",
2208 | "description" : null,
2209 | "type" : {
2210 | "kind" : "LIST",
2211 | "name" : null,
2212 | "ofType" : {
2213 | "kind" : "SCALAR",
2214 | "name" : "Float",
2215 | "ofType" : null
2216 | }
2217 | },
2218 | "defaultValue" : null
2219 | } ],
2220 | "interfaces" : null,
2221 | "enumValues" : null,
2222 | "possibleTypes" : null
2223 | }, {
2224 | "kind" : "SCALAR",
2225 | "name" : "Float",
2226 | "description" : "Built-in Float",
2227 | "fields" : null,
2228 | "inputFields" : null,
2229 | "interfaces" : null,
2230 | "enumValues" : null,
2231 | "possibleTypes" : null
2232 | }, {
2233 | "kind" : "OBJECT",
2234 | "name" : "__Schema",
2235 | "description" : "A GraphQL Introspection defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, the entry points for query, mutation, and subscription operations.",
2236 | "fields" : [ {
2237 | "name" : "types",
2238 | "description" : "A list of all types supported by this server.",
2239 | "args" : [ ],
2240 | "type" : {
2241 | "kind" : "NON_NULL",
2242 | "name" : null,
2243 | "ofType" : {
2244 | "kind" : "LIST",
2245 | "name" : null,
2246 | "ofType" : {
2247 | "kind" : "NON_NULL",
2248 | "name" : null,
2249 | "ofType" : {
2250 | "kind" : "OBJECT",
2251 | "name" : "__Type",
2252 | "ofType" : null
2253 | }
2254 | }
2255 | }
2256 | },
2257 | "isDeprecated" : false,
2258 | "deprecationReason" : null
2259 | }, {
2260 | "name" : "queryType",
2261 | "description" : "The type that query operations will be rooted at.",
2262 | "args" : [ ],
2263 | "type" : {
2264 | "kind" : "NON_NULL",
2265 | "name" : null,
2266 | "ofType" : {
2267 | "kind" : "OBJECT",
2268 | "name" : "__Type",
2269 | "ofType" : null
2270 | }
2271 | },
2272 | "isDeprecated" : false,
2273 | "deprecationReason" : null
2274 | }, {
2275 | "name" : "mutationType",
2276 | "description" : "If this server supports mutation, the type that mutation operations will be rooted at.",
2277 | "args" : [ ],
2278 | "type" : {
2279 | "kind" : "OBJECT",
2280 | "name" : "__Type",
2281 | "ofType" : null
2282 | },
2283 | "isDeprecated" : false,
2284 | "deprecationReason" : null
2285 | }, {
2286 | "name" : "directives",
2287 | "description" : "'A list of all directives supported by this server.",
2288 | "args" : [ ],
2289 | "type" : {
2290 | "kind" : "NON_NULL",
2291 | "name" : null,
2292 | "ofType" : {
2293 | "kind" : "LIST",
2294 | "name" : null,
2295 | "ofType" : {
2296 | "kind" : "NON_NULL",
2297 | "name" : null,
2298 | "ofType" : {
2299 | "kind" : "OBJECT",
2300 | "name" : "__Directive",
2301 | "ofType" : null
2302 | }
2303 | }
2304 | }
2305 | },
2306 | "isDeprecated" : false,
2307 | "deprecationReason" : null
2308 | }, {
2309 | "name" : "subscriptionType",
2310 | "description" : "'If this server support subscription, the type that subscription operations will be rooted at.",
2311 | "args" : [ ],
2312 | "type" : {
2313 | "kind" : "OBJECT",
2314 | "name" : "__Type",
2315 | "ofType" : null
2316 | },
2317 | "isDeprecated" : false,
2318 | "deprecationReason" : null
2319 | } ],
2320 | "inputFields" : null,
2321 | "interfaces" : [ ],
2322 | "enumValues" : null,
2323 | "possibleTypes" : null
2324 | }, {
2325 | "kind" : "OBJECT",
2326 | "name" : "__Type",
2327 | "description" : null,
2328 | "fields" : [ {
2329 | "name" : "kind",
2330 | "description" : null,
2331 | "args" : [ ],
2332 | "type" : {
2333 | "kind" : "NON_NULL",
2334 | "name" : null,
2335 | "ofType" : {
2336 | "kind" : "ENUM",
2337 | "name" : "__TypeKind",
2338 | "ofType" : null
2339 | }
2340 | },
2341 | "isDeprecated" : false,
2342 | "deprecationReason" : null
2343 | }, {
2344 | "name" : "name",
2345 | "description" : null,
2346 | "args" : [ ],
2347 | "type" : {
2348 | "kind" : "SCALAR",
2349 | "name" : "String",
2350 | "ofType" : null
2351 | },
2352 | "isDeprecated" : false,
2353 | "deprecationReason" : null
2354 | }, {
2355 | "name" : "description",
2356 | "description" : null,
2357 | "args" : [ ],
2358 | "type" : {
2359 | "kind" : "SCALAR",
2360 | "name" : "String",
2361 | "ofType" : null
2362 | },
2363 | "isDeprecated" : false,
2364 | "deprecationReason" : null
2365 | }, {
2366 | "name" : "fields",
2367 | "description" : null,
2368 | "args" : [ {
2369 | "name" : "includeDeprecated",
2370 | "description" : null,
2371 | "type" : {
2372 | "kind" : "SCALAR",
2373 | "name" : "Boolean",
2374 | "ofType" : null
2375 | },
2376 | "defaultValue" : "false"
2377 | } ],
2378 | "type" : {
2379 | "kind" : "LIST",
2380 | "name" : null,
2381 | "ofType" : {
2382 | "kind" : "NON_NULL",
2383 | "name" : null,
2384 | "ofType" : {
2385 | "kind" : "OBJECT",
2386 | "name" : "__Field",
2387 | "ofType" : null
2388 | }
2389 | }
2390 | },
2391 | "isDeprecated" : false,
2392 | "deprecationReason" : null
2393 | }, {
2394 | "name" : "interfaces",
2395 | "description" : null,
2396 | "args" : [ ],
2397 | "type" : {
2398 | "kind" : "LIST",
2399 | "name" : null,
2400 | "ofType" : {
2401 | "kind" : "NON_NULL",
2402 | "name" : null,
2403 | "ofType" : {
2404 | "kind" : "OBJECT",
2405 | "name" : "__Type",
2406 | "ofType" : null
2407 | }
2408 | }
2409 | },
2410 | "isDeprecated" : false,
2411 | "deprecationReason" : null
2412 | }, {
2413 | "name" : "possibleTypes",
2414 | "description" : null,
2415 | "args" : [ ],
2416 | "type" : {
2417 | "kind" : "LIST",
2418 | "name" : null,
2419 | "ofType" : {
2420 | "kind" : "NON_NULL",
2421 | "name" : null,
2422 | "ofType" : {
2423 | "kind" : "OBJECT",
2424 | "name" : "__Type",
2425 | "ofType" : null
2426 | }
2427 | }
2428 | },
2429 | "isDeprecated" : false,
2430 | "deprecationReason" : null
2431 | }, {
2432 | "name" : "enumValues",
2433 | "description" : null,
2434 | "args" : [ {
2435 | "name" : "includeDeprecated",
2436 | "description" : null,
2437 | "type" : {
2438 | "kind" : "SCALAR",
2439 | "name" : "Boolean",
2440 | "ofType" : null
2441 | },
2442 | "defaultValue" : "false"
2443 | } ],
2444 | "type" : {
2445 | "kind" : "LIST",
2446 | "name" : null,
2447 | "ofType" : {
2448 | "kind" : "NON_NULL",
2449 | "name" : null,
2450 | "ofType" : {
2451 | "kind" : "OBJECT",
2452 | "name" : "__EnumValue",
2453 | "ofType" : null
2454 | }
2455 | }
2456 | },
2457 | "isDeprecated" : false,
2458 | "deprecationReason" : null
2459 | }, {
2460 | "name" : "inputFields",
2461 | "description" : null,
2462 | "args" : [ ],
2463 | "type" : {
2464 | "kind" : "LIST",
2465 | "name" : null,
2466 | "ofType" : {
2467 | "kind" : "NON_NULL",
2468 | "name" : null,
2469 | "ofType" : {
2470 | "kind" : "OBJECT",
2471 | "name" : "__InputValue",
2472 | "ofType" : null
2473 | }
2474 | }
2475 | },
2476 | "isDeprecated" : false,
2477 | "deprecationReason" : null
2478 | }, {
2479 | "name" : "ofType",
2480 | "description" : null,
2481 | "args" : [ ],
2482 | "type" : {
2483 | "kind" : "OBJECT",
2484 | "name" : "__Type",
2485 | "ofType" : null
2486 | },
2487 | "isDeprecated" : false,
2488 | "deprecationReason" : null
2489 | } ],
2490 | "inputFields" : null,
2491 | "interfaces" : [ ],
2492 | "enumValues" : null,
2493 | "possibleTypes" : null
2494 | }, {
2495 | "kind" : "ENUM",
2496 | "name" : "__TypeKind",
2497 | "description" : "An enum describing what kind of type a given __Type is",
2498 | "fields" : null,
2499 | "inputFields" : null,
2500 | "interfaces" : null,
2501 | "enumValues" : [ {
2502 | "name" : "SCALAR",
2503 | "description" : "Indicates this type is a scalar.",
2504 | "isDeprecated" : false,
2505 | "deprecationReason" : null
2506 | }, {
2507 | "name" : "OBJECT",
2508 | "description" : "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
2509 | "isDeprecated" : false,
2510 | "deprecationReason" : null
2511 | }, {
2512 | "name" : "INTERFACE",
2513 | "description" : "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
2514 | "isDeprecated" : false,
2515 | "deprecationReason" : null
2516 | }, {
2517 | "name" : "UNION",
2518 | "description" : "Indicates this type is a union. `possibleTypes` is a valid field.",
2519 | "isDeprecated" : false,
2520 | "deprecationReason" : null
2521 | }, {
2522 | "name" : "ENUM",
2523 | "description" : "Indicates this type is an enum. `enumValues` is a valid field.",
2524 | "isDeprecated" : false,
2525 | "deprecationReason" : null
2526 | }, {
2527 | "name" : "INPUT_OBJECT",
2528 | "description" : "Indicates this type is an input object. `inputFields` is a valid field.",
2529 | "isDeprecated" : false,
2530 | "deprecationReason" : null
2531 | }, {
2532 | "name" : "LIST",
2533 | "description" : "Indicates this type is a list. `ofType` is a valid field.",
2534 | "isDeprecated" : false,
2535 | "deprecationReason" : null
2536 | }, {
2537 | "name" : "NON_NULL",
2538 | "description" : "Indicates this type is a non-null. `ofType` is a valid field.",
2539 | "isDeprecated" : false,
2540 | "deprecationReason" : null
2541 | } ],
2542 | "possibleTypes" : null
2543 | }, {
2544 | "kind" : "OBJECT",
2545 | "name" : "__Field",
2546 | "description" : null,
2547 | "fields" : [ {
2548 | "name" : "name",
2549 | "description" : null,
2550 | "args" : [ ],
2551 | "type" : {
2552 | "kind" : "NON_NULL",
2553 | "name" : null,
2554 | "ofType" : {
2555 | "kind" : "SCALAR",
2556 | "name" : "String",
2557 | "ofType" : null
2558 | }
2559 | },
2560 | "isDeprecated" : false,
2561 | "deprecationReason" : null
2562 | }, {
2563 | "name" : "description",
2564 | "description" : null,
2565 | "args" : [ ],
2566 | "type" : {
2567 | "kind" : "SCALAR",
2568 | "name" : "String",
2569 | "ofType" : null
2570 | },
2571 | "isDeprecated" : false,
2572 | "deprecationReason" : null
2573 | }, {
2574 | "name" : "args",
2575 | "description" : null,
2576 | "args" : [ ],
2577 | "type" : {
2578 | "kind" : "NON_NULL",
2579 | "name" : null,
2580 | "ofType" : {
2581 | "kind" : "LIST",
2582 | "name" : null,
2583 | "ofType" : {
2584 | "kind" : "NON_NULL",
2585 | "name" : null,
2586 | "ofType" : {
2587 | "kind" : "OBJECT",
2588 | "name" : "__InputValue",
2589 | "ofType" : null
2590 | }
2591 | }
2592 | }
2593 | },
2594 | "isDeprecated" : false,
2595 | "deprecationReason" : null
2596 | }, {
2597 | "name" : "type",
2598 | "description" : null,
2599 | "args" : [ ],
2600 | "type" : {
2601 | "kind" : "NON_NULL",
2602 | "name" : null,
2603 | "ofType" : {
2604 | "kind" : "OBJECT",
2605 | "name" : "__Type",
2606 | "ofType" : null
2607 | }
2608 | },
2609 | "isDeprecated" : false,
2610 | "deprecationReason" : null
2611 | }, {
2612 | "name" : "isDeprecated",
2613 | "description" : null,
2614 | "args" : [ ],
2615 | "type" : {
2616 | "kind" : "NON_NULL",
2617 | "name" : null,
2618 | "ofType" : {
2619 | "kind" : "SCALAR",
2620 | "name" : "Boolean",
2621 | "ofType" : null
2622 | }
2623 | },
2624 | "isDeprecated" : false,
2625 | "deprecationReason" : null
2626 | }, {
2627 | "name" : "deprecationReason",
2628 | "description" : null,
2629 | "args" : [ ],
2630 | "type" : {
2631 | "kind" : "SCALAR",
2632 | "name" : "String",
2633 | "ofType" : null
2634 | },
2635 | "isDeprecated" : false,
2636 | "deprecationReason" : null
2637 | } ],
2638 | "inputFields" : null,
2639 | "interfaces" : [ ],
2640 | "enumValues" : null,
2641 | "possibleTypes" : null
2642 | }, {
2643 | "kind" : "OBJECT",
2644 | "name" : "__InputValue",
2645 | "description" : null,
2646 | "fields" : [ {
2647 | "name" : "name",
2648 | "description" : null,
2649 | "args" : [ ],
2650 | "type" : {
2651 | "kind" : "NON_NULL",
2652 | "name" : null,
2653 | "ofType" : {
2654 | "kind" : "SCALAR",
2655 | "name" : "String",
2656 | "ofType" : null
2657 | }
2658 | },
2659 | "isDeprecated" : false,
2660 | "deprecationReason" : null
2661 | }, {
2662 | "name" : "description",
2663 | "description" : null,
2664 | "args" : [ ],
2665 | "type" : {
2666 | "kind" : "SCALAR",
2667 | "name" : "String",
2668 | "ofType" : null
2669 | },
2670 | "isDeprecated" : false,
2671 | "deprecationReason" : null
2672 | }, {
2673 | "name" : "type",
2674 | "description" : null,
2675 | "args" : [ ],
2676 | "type" : {
2677 | "kind" : "NON_NULL",
2678 | "name" : null,
2679 | "ofType" : {
2680 | "kind" : "OBJECT",
2681 | "name" : "__Type",
2682 | "ofType" : null
2683 | }
2684 | },
2685 | "isDeprecated" : false,
2686 | "deprecationReason" : null
2687 | }, {
2688 | "name" : "defaultValue",
2689 | "description" : null,
2690 | "args" : [ ],
2691 | "type" : {
2692 | "kind" : "SCALAR",
2693 | "name" : "String",
2694 | "ofType" : null
2695 | },
2696 | "isDeprecated" : false,
2697 | "deprecationReason" : null
2698 | } ],
2699 | "inputFields" : null,
2700 | "interfaces" : [ ],
2701 | "enumValues" : null,
2702 | "possibleTypes" : null
2703 | }, {
2704 | "kind" : "OBJECT",
2705 | "name" : "__EnumValue",
2706 | "description" : null,
2707 | "fields" : [ {
2708 | "name" : "name",
2709 | "description" : null,
2710 | "args" : [ ],
2711 | "type" : {
2712 | "kind" : "NON_NULL",
2713 | "name" : null,
2714 | "ofType" : {
2715 | "kind" : "SCALAR",
2716 | "name" : "String",
2717 | "ofType" : null
2718 | }
2719 | },
2720 | "isDeprecated" : false,
2721 | "deprecationReason" : null
2722 | }, {
2723 | "name" : "description",
2724 | "description" : null,
2725 | "args" : [ ],
2726 | "type" : {
2727 | "kind" : "SCALAR",
2728 | "name" : "String",
2729 | "ofType" : null
2730 | },
2731 | "isDeprecated" : false,
2732 | "deprecationReason" : null
2733 | }, {
2734 | "name" : "isDeprecated",
2735 | "description" : null,
2736 | "args" : [ ],
2737 | "type" : {
2738 | "kind" : "NON_NULL",
2739 | "name" : null,
2740 | "ofType" : {
2741 | "kind" : "SCALAR",
2742 | "name" : "Boolean",
2743 | "ofType" : null
2744 | }
2745 | },
2746 | "isDeprecated" : false,
2747 | "deprecationReason" : null
2748 | }, {
2749 | "name" : "deprecationReason",
2750 | "description" : null,
2751 | "args" : [ ],
2752 | "type" : {
2753 | "kind" : "SCALAR",
2754 | "name" : "String",
2755 | "ofType" : null
2756 | },
2757 | "isDeprecated" : false,
2758 | "deprecationReason" : null
2759 | } ],
2760 | "inputFields" : null,
2761 | "interfaces" : [ ],
2762 | "enumValues" : null,
2763 | "possibleTypes" : null
2764 | }, {
2765 | "kind" : "OBJECT",
2766 | "name" : "__Directive",
2767 | "description" : null,
2768 | "fields" : [ {
2769 | "name" : "name",
2770 | "description" : null,
2771 | "args" : [ ],
2772 | "type" : {
2773 | "kind" : "SCALAR",
2774 | "name" : "String",
2775 | "ofType" : null
2776 | },
2777 | "isDeprecated" : false,
2778 | "deprecationReason" : null
2779 | }, {
2780 | "name" : "description",
2781 | "description" : null,
2782 | "args" : [ ],
2783 | "type" : {
2784 | "kind" : "SCALAR",
2785 | "name" : "String",
2786 | "ofType" : null
2787 | },
2788 | "isDeprecated" : false,
2789 | "deprecationReason" : null
2790 | }, {
2791 | "name" : "locations",
2792 | "description" : null,
2793 | "args" : [ ],
2794 | "type" : {
2795 | "kind" : "LIST",
2796 | "name" : null,
2797 | "ofType" : {
2798 | "kind" : "NON_NULL",
2799 | "name" : null,
2800 | "ofType" : {
2801 | "kind" : "ENUM",
2802 | "name" : "__DirectiveLocation",
2803 | "ofType" : null
2804 | }
2805 | }
2806 | },
2807 | "isDeprecated" : false,
2808 | "deprecationReason" : null
2809 | }, {
2810 | "name" : "args",
2811 | "description" : null,
2812 | "args" : [ ],
2813 | "type" : {
2814 | "kind" : "NON_NULL",
2815 | "name" : null,
2816 | "ofType" : {
2817 | "kind" : "LIST",
2818 | "name" : null,
2819 | "ofType" : {
2820 | "kind" : "NON_NULL",
2821 | "name" : null,
2822 | "ofType" : {
2823 | "kind" : "OBJECT",
2824 | "name" : "__InputValue",
2825 | "ofType" : null
2826 | }
2827 | }
2828 | }
2829 | },
2830 | "isDeprecated" : false,
2831 | "deprecationReason" : null
2832 | }, {
2833 | "name" : "onOperation",
2834 | "description" : null,
2835 | "args" : [ ],
2836 | "type" : {
2837 | "kind" : "SCALAR",
2838 | "name" : "Boolean",
2839 | "ofType" : null
2840 | },
2841 | "isDeprecated" : true,
2842 | "deprecationReason" : "Use `locations`."
2843 | }, {
2844 | "name" : "onFragment",
2845 | "description" : null,
2846 | "args" : [ ],
2847 | "type" : {
2848 | "kind" : "SCALAR",
2849 | "name" : "Boolean",
2850 | "ofType" : null
2851 | },
2852 | "isDeprecated" : true,
2853 | "deprecationReason" : "Use `locations`."
2854 | }, {
2855 | "name" : "onField",
2856 | "description" : null,
2857 | "args" : [ ],
2858 | "type" : {
2859 | "kind" : "SCALAR",
2860 | "name" : "Boolean",
2861 | "ofType" : null
2862 | },
2863 | "isDeprecated" : true,
2864 | "deprecationReason" : "Use `locations`."
2865 | } ],
2866 | "inputFields" : null,
2867 | "interfaces" : [ ],
2868 | "enumValues" : null,
2869 | "possibleTypes" : null
2870 | }, {
2871 | "kind" : "ENUM",
2872 | "name" : "__DirectiveLocation",
2873 | "description" : "An enum describing valid locations where a directive can be placed",
2874 | "fields" : null,
2875 | "inputFields" : null,
2876 | "interfaces" : null,
2877 | "enumValues" : [ {
2878 | "name" : "QUERY",
2879 | "description" : "Indicates the directive is valid on queries.",
2880 | "isDeprecated" : false,
2881 | "deprecationReason" : null
2882 | }, {
2883 | "name" : "MUTATION",
2884 | "description" : "Indicates the directive is valid on mutations.",
2885 | "isDeprecated" : false,
2886 | "deprecationReason" : null
2887 | }, {
2888 | "name" : "FIELD",
2889 | "description" : "Indicates the directive is valid on fields.",
2890 | "isDeprecated" : false,
2891 | "deprecationReason" : null
2892 | }, {
2893 | "name" : "FRAGMENT_DEFINITION",
2894 | "description" : "Indicates the directive is valid on fragment definitions.",
2895 | "isDeprecated" : false,
2896 | "deprecationReason" : null
2897 | }, {
2898 | "name" : "FRAGMENT_SPREAD",
2899 | "description" : "Indicates the directive is valid on fragment spreads.",
2900 | "isDeprecated" : false,
2901 | "deprecationReason" : null
2902 | }, {
2903 | "name" : "INLINE_FRAGMENT",
2904 | "description" : "Indicates the directive is valid on inline fragments.",
2905 | "isDeprecated" : false,
2906 | "deprecationReason" : null
2907 | }, {
2908 | "name" : "SCHEMA",
2909 | "description" : "Indicates the directive is valid on a schema SDL definition.",
2910 | "isDeprecated" : false,
2911 | "deprecationReason" : null
2912 | }, {
2913 | "name" : "SCALAR",
2914 | "description" : "Indicates the directive is valid on a scalar SDL definition.",
2915 | "isDeprecated" : false,
2916 | "deprecationReason" : null
2917 | }, {
2918 | "name" : "OBJECT",
2919 | "description" : "Indicates the directive is valid on an object SDL definition.",
2920 | "isDeprecated" : false,
2921 | "deprecationReason" : null
2922 | }, {
2923 | "name" : "FIELD_DEFINITION",
2924 | "description" : "Indicates the directive is valid on a field SDL definition.",
2925 | "isDeprecated" : false,
2926 | "deprecationReason" : null
2927 | }, {
2928 | "name" : "ARGUMENT_DEFINITION",
2929 | "description" : "Indicates the directive is valid on a field argument SDL definition.",
2930 | "isDeprecated" : false,
2931 | "deprecationReason" : null
2932 | }, {
2933 | "name" : "INTERFACE",
2934 | "description" : "Indicates the directive is valid on an interface SDL definition.",
2935 | "isDeprecated" : false,
2936 | "deprecationReason" : null
2937 | }, {
2938 | "name" : "UNION",
2939 | "description" : "Indicates the directive is valid on an union SDL definition.",
2940 | "isDeprecated" : false,
2941 | "deprecationReason" : null
2942 | }, {
2943 | "name" : "ENUM",
2944 | "description" : "Indicates the directive is valid on an enum SDL definition.",
2945 | "isDeprecated" : false,
2946 | "deprecationReason" : null
2947 | }, {
2948 | "name" : "ENUM_VALUE",
2949 | "description" : "Indicates the directive is valid on an enum value SDL definition.",
2950 | "isDeprecated" : false,
2951 | "deprecationReason" : null
2952 | }, {
2953 | "name" : "INPUT_OBJECT",
2954 | "description" : "Indicates the directive is valid on an input object SDL definition.",
2955 | "isDeprecated" : false,
2956 | "deprecationReason" : null
2957 | }, {
2958 | "name" : "INPUT_FIELD_DEFINITION",
2959 | "description" : "Indicates the directive is valid on an input object field SDL definition.",
2960 | "isDeprecated" : false,
2961 | "deprecationReason" : null
2962 | } ],
2963 | "possibleTypes" : null
2964 | } ],
2965 | "directives" : [ {
2966 | "name" : "include",
2967 | "description" : "Directs the executor to include this field or fragment only when the `if` argument is true",
2968 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2969 | "args" : [ {
2970 | "name" : "if",
2971 | "description" : "Included when true.",
2972 | "type" : {
2973 | "kind" : "NON_NULL",
2974 | "name" : null,
2975 | "ofType" : {
2976 | "kind" : "SCALAR",
2977 | "name" : "Boolean",
2978 | "ofType" : null
2979 | }
2980 | },
2981 | "defaultValue" : null
2982 | } ],
2983 | "onOperation" : false,
2984 | "onFragment" : true,
2985 | "onField" : true
2986 | }, {
2987 | "name" : "skip",
2988 | "description" : "Directs the executor to skip this field or fragment when the `if`'argument is true.",
2989 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2990 | "args" : [ {
2991 | "name" : "if",
2992 | "description" : "Skipped when true.",
2993 | "type" : {
2994 | "kind" : "NON_NULL",
2995 | "name" : null,
2996 | "ofType" : {
2997 | "kind" : "SCALAR",
2998 | "name" : "Boolean",
2999 | "ofType" : null
3000 | }
3001 | },
3002 | "defaultValue" : null
3003 | } ],
3004 | "onOperation" : false,
3005 | "onFragment" : true,
3006 | "onField" : true
3007 | }, {
3008 | "name" : "defer",
3009 | "description" : "This directive allows results to be deferred during execution",
3010 | "locations" : [ "FIELD" ],
3011 | "args" : [ ],
3012 | "onOperation" : false,
3013 | "onFragment" : false,
3014 | "onField" : true
3015 | }, {
3016 | "name" : "aws_iam",
3017 | "description" : "Tells the service this field/object has access authorized by sigv4 signing.",
3018 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
3019 | "args" : [ ],
3020 | "onOperation" : false,
3021 | "onFragment" : false,
3022 | "onField" : false
3023 | }, {
3024 | "name" : "aws_oidc",
3025 | "description" : "Tells the service this field/object has access authorized by an OIDC token.",
3026 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
3027 | "args" : [ ],
3028 | "onOperation" : false,
3029 | "onFragment" : false,
3030 | "onField" : false
3031 | }, {
3032 | "name" : "aws_subscribe",
3033 | "description" : "Tells the service which mutation triggers this subscription.",
3034 | "locations" : [ "FIELD_DEFINITION" ],
3035 | "args" : [ {
3036 | "name" : "mutations",
3037 | "description" : "List of mutations which will trigger this subscription when they are called.",
3038 | "type" : {
3039 | "kind" : "LIST",
3040 | "name" : null,
3041 | "ofType" : {
3042 | "kind" : "SCALAR",
3043 | "name" : "String",
3044 | "ofType" : null
3045 | }
3046 | },
3047 | "defaultValue" : null
3048 | } ],
3049 | "onOperation" : false,
3050 | "onFragment" : false,
3051 | "onField" : false
3052 | }, {
3053 | "name" : "deprecated",
3054 | "description" : null,
3055 | "locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
3056 | "args" : [ {
3057 | "name" : "reason",
3058 | "description" : null,
3059 | "type" : {
3060 | "kind" : "SCALAR",
3061 | "name" : "String",
3062 | "ofType" : null
3063 | },
3064 | "defaultValue" : "\"No longer supported\""
3065 | } ],
3066 | "onOperation" : false,
3067 | "onFragment" : false,
3068 | "onField" : false
3069 | }, {
3070 | "name" : "aws_cognito_user_pools",
3071 | "description" : "Tells the service this field/object has access authorized by a Cognito User Pools token.",
3072 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
3073 | "args" : [ {
3074 | "name" : "cognito_groups",
3075 | "description" : "List of cognito user pool groups which have access on this field",
3076 | "type" : {
3077 | "kind" : "LIST",
3078 | "name" : null,
3079 | "ofType" : {
3080 | "kind" : "SCALAR",
3081 | "name" : "String",
3082 | "ofType" : null
3083 | }
3084 | },
3085 | "defaultValue" : null
3086 | } ],
3087 | "onOperation" : false,
3088 | "onFragment" : false,
3089 | "onField" : false
3090 | }, {
3091 | "name" : "aws_publish",
3092 | "description" : "Tells the service which subscriptions will be published to when this mutation is called. This directive is deprecated use @aws_susbscribe directive instead.",
3093 | "locations" : [ "FIELD_DEFINITION" ],
3094 | "args" : [ {
3095 | "name" : "subscriptions",
3096 | "description" : "List of subscriptions which will be published to when this mutation is called.",
3097 | "type" : {
3098 | "kind" : "LIST",
3099 | "name" : null,
3100 | "ofType" : {
3101 | "kind" : "SCALAR",
3102 | "name" : "String",
3103 | "ofType" : null
3104 | }
3105 | },
3106 | "defaultValue" : null
3107 | } ],
3108 | "onOperation" : false,
3109 | "onFragment" : false,
3110 | "onField" : false
3111 | }, {
3112 | "name" : "aws_auth",
3113 | "description" : "Directs the schema to enforce authorization on a field",
3114 | "locations" : [ "FIELD_DEFINITION" ],
3115 | "args" : [ {
3116 | "name" : "cognito_groups",
3117 | "description" : "List of cognito user pool groups which have access on this field",
3118 | "type" : {
3119 | "kind" : "LIST",
3120 | "name" : null,
3121 | "ofType" : {
3122 | "kind" : "SCALAR",
3123 | "name" : "String",
3124 | "ofType" : null
3125 | }
3126 | },
3127 | "defaultValue" : null
3128 | } ],
3129 | "onOperation" : false,
3130 | "onFragment" : false,
3131 | "onField" : false
3132 | }, {
3133 | "name" : "aws_api_key",
3134 | "description" : "Tells the service this field/object has access authorized by an API key.",
3135 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
3136 | "args" : [ ],
3137 | "onOperation" : false,
3138 | "onFragment" : false,
3139 | "onField" : false
3140 | } ]
3141 | }
3142 | }
3143 | }
3144 |
--------------------------------------------------------------------------------