├── .eslintrc.js
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── amplify
├── .config
│ └── project-config.json
├── backend
│ ├── api
│ │ ├── booksearchgraphql
│ │ │ ├── parameters.json
│ │ │ ├── schema.graphql
│ │ │ ├── stacks
│ │ │ │ └── CustomResources.json
│ │ │ └── transform.conf.json
│ │ └── booksearchrest
│ │ │ ├── api-params.json
│ │ │ ├── booksearchrest-cloudformation-template.json
│ │ │ └── parameters.json
│ ├── auth
│ │ └── amplifyvuesearchexam21160aeb
│ │ │ ├── amplifyvuesearchexam21160aeb-cloudformation-template.yml
│ │ │ └── parameters.json
│ ├── backend-config.json
│ ├── function
│ │ └── booksearchrest
│ │ │ ├── booksearchrest-cloudformation-template.json
│ │ │ ├── function-parameters.json
│ │ │ └── src
│ │ │ ├── app.js
│ │ │ ├── event.json
│ │ │ ├── index.js
│ │ │ └── package.json
│ └── storage
│ │ └── booksearchrest
│ │ ├── booksearchrest-cloudformation-template.json
│ │ ├── parameters.json
│ │ └── storage-params.json
└── team-provider-info.json
├── babel.config.js
├── jest.config.js
├── package.json
├── public
├── assets
│ └── architecture.png
├── favicon.ico
├── images
│ ├── architecture.png
│ └── dashboard.png
└── index.html
├── src
├── App.vue
├── assets
│ ├── logo.png
│ └── logo.svg
├── components
│ ├── GraphqlSearchForm.vue
│ ├── RegisterForm.vue
│ ├── RestApiSearchForm.vue
│ └── SearchResult.vue
├── graphql
│ ├── mutations.js
│ ├── queries.js
│ ├── schema.json
│ └── subscriptions.js
├── main.js
├── plugins
│ └── vuetify.js
├── router
│ └── index.js
└── views
│ ├── GraphqlRegister.vue
│ ├── GraphqlSearch.vue
│ ├── Home.vue
│ ├── RestRegister.vue
│ ├── RestSearch.vue
│ └── Welcome.vue
├── tests
└── unit
│ ├── example.spec.js
│ └── setup.js
└── vue.config.js
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | 'extends': [
7 | 'plugin:vue/essential',
8 | 'eslint:recommended'
9 | ],
10 | parserOptions: {
11 | parser: 'babel-eslint'
12 | },
13 | rules: {
14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
16 | },
17 | overrides: [
18 | {
19 | files: [
20 | '**/__tests__/*.{j,t}s?(x)',
21 | '**/tests/unit/**/*.spec.{j,t}s?(x)'
22 | ],
23 | env: {
24 | jest: true
25 | }
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
23 | #amplify
24 | amplify/\#current-cloud-backend
25 | amplify/.config/local-*
26 | amplify/mock-data
27 | amplify/backend/amplify-meta.json
28 | amplify/backend/awscloudformation
29 | build/
30 | dist/
31 | node_modules/
32 | aws-exports.js
33 | awsconfiguration.json
34 | amplifyconfiguration.json
35 | amplify-build-config.json
36 | amplify-gradle-config.json
37 | amplifyxc.config
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Code of Conduct
2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4 | opensource-codeofconduct@amazon.com with any additional questions or comments.
5 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guidelines
2 |
3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4 | documentation, we greatly value feedback and contributions from our community.
5 |
6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7 | information to effectively respond to your bug report or contribution.
8 |
9 |
10 | ## Reporting Bugs/Feature Requests
11 |
12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13 |
14 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16 |
17 | * A reproducible test case or series of steps
18 | * The version of our code being used
19 | * Any modifications you've made relevant to the bug
20 | * Anything unusual about your environment or deployment
21 |
22 |
23 | ## Contributing via Pull Requests
24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25 |
26 | 1. You are working against the latest source on the *master* branch.
27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29 |
30 | To send us a pull request, please:
31 |
32 | 1. Fork the repository.
33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34 | 3. Ensure local tests pass.
35 | 4. Commit to your fork using clear commit messages.
36 | 5. Send us a pull request, answering any default questions in the pull request interface.
37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38 |
39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41 |
42 |
43 | ## Finding contributions to work on
44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
45 |
46 |
47 | ## Code of Conduct
48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50 | opensource-codeofconduct@amazon.com with any additional questions or comments.
51 |
52 |
53 | ## Security issue notifications
54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
55 |
56 |
57 | ## Licensing
58 |
59 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
60 |
61 | We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
62 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Amplify Vue Search Example
2 |
3 | A Vue.js sample Book Search project integrated with aws-amplify.
4 | The Book Search project implements a book information registration and search service using REST API and GraphQL.
5 |
6 | 
7 |
8 | ## Architecture
9 |
10 | 
11 |
12 | - The book search using REST API uses API Gateway, Lambda, and DynamoDB.
13 | - GraphQL API uses AppSync, DynamoDB, Lambda (triggered by DynamoDB Stream), and Elasticsearch to perform searches, while Elasticsearch implements more flexible searches using full-text search.
14 |
15 | All of these architectures are implemented using the Amplify CLI.
16 |
17 | ## Getting Started
18 |
19 | 1. Install Amplify CLI
20 |
21 | ```bash
22 | $ npm install -g @aws-amplify/cli
23 | ```
24 |
25 | 2. Clone project and install dependencies
26 |
27 | ```bash
28 | $ git clone https://github.com/aws-samples/amplify-vue-search-example.git
29 | $ cd amplify-vue-search-example
30 | $ npm install
31 | ```
32 |
33 | 3. Create backend
34 |
35 | ```bash
36 | $ amplify init
37 | $ amplify push
38 | ```
39 |
40 | 4. Start the project
41 |
42 | ```bash
43 | $ npm run serve
44 | ```
45 |
46 | open http://localhost:8080/
47 |
48 | ## Security
49 |
50 | See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
51 |
52 | ## License
53 |
54 | This library is licensed under the MIT-0 License. See the LICENSE file.
55 |
--------------------------------------------------------------------------------
/amplify/.config/project-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "projectName": "amplifyvuesearchexam",
3 | "version": "3.0",
4 | "frontend": "javascript",
5 | "javascript": {
6 | "framework": "vue",
7 | "config": {
8 | "SourceDir": "src",
9 | "DistributionDir": "dist",
10 | "BuildCommand": "npm run-script build",
11 | "StartCommand": "npm run-script serve"
12 | }
13 | },
14 | "providers": [
15 | "awscloudformation"
16 | ]
17 | }
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchgraphql/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "AppSyncApiName": "booksearchgraphql",
3 | "DynamoDBBillingMode": "PAY_PER_REQUEST",
4 | "DynamoDBEnableServerSideEncryption": "false",
5 | "AuthCognitoUserPoolId": {
6 | "Fn::GetAtt": [
7 | "authamplifyvuesearchexam21160aeb",
8 | "Outputs.UserPoolId"
9 | ]
10 | }
11 | }
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchgraphql/schema.graphql:
--------------------------------------------------------------------------------
1 | type Book @model @searchable {
2 | id: ID!
3 | title: String!
4 | author: String!
5 | price: Int!
6 | description: String
7 | releaseDate: AWSDate
8 | }
9 |
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchgraphql/stacks/CustomResources.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "An auto-generated nested stack.",
4 | "Metadata": {},
5 | "Parameters": {
6 | "AppSyncApiId": {
7 | "Type": "String",
8 | "Description": "The id of the AppSync API associated with this project."
9 | },
10 | "AppSyncApiName": {
11 | "Type": "String",
12 | "Description": "The name of the AppSync API",
13 | "Default": "AppSyncSimpleTransform"
14 | },
15 | "env": {
16 | "Type": "String",
17 | "Description": "The environment name. e.g. Dev, Test, or Production",
18 | "Default": "NONE"
19 | },
20 | "S3DeploymentBucket": {
21 | "Type": "String",
22 | "Description": "The S3 bucket containing all deployment assets for the project."
23 | },
24 | "S3DeploymentRootKey": {
25 | "Type": "String",
26 | "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory."
27 | }
28 | },
29 | "Resources": {
30 | "EmptyResource": {
31 | "Type": "Custom::EmptyResource",
32 | "Condition": "AlwaysFalse"
33 | }
34 | },
35 | "Conditions": {
36 | "HasEnvironmentParameter": {
37 | "Fn::Not": [
38 | {
39 | "Fn::Equals": [
40 | {
41 | "Ref": "env"
42 | },
43 | "NONE"
44 | ]
45 | }
46 | ]
47 | },
48 | "AlwaysFalse": {
49 | "Fn::Equals": [
50 | "true",
51 | "false"
52 | ]
53 | }
54 | },
55 | "Outputs": {
56 | "EmptyOutput": {
57 | "Description": "An empty output. You may delete this if you have at least one resource above.",
58 | "Value": ""
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchgraphql/transform.conf.json:
--------------------------------------------------------------------------------
1 | {
2 | "Version": 5,
3 | "ElasticsearchWarning": true
4 | }
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchrest/api-params.json:
--------------------------------------------------------------------------------
1 | {
2 | "paths": [
3 | {
4 | "name": "/book",
5 | "lambdaFunction": "booksearchrest",
6 | "privacy": {
7 | "private": true,
8 | "auth": [
9 | "/POST",
10 | "/GET",
11 | "/PUT",
12 | "/PATCH",
13 | "/DELETE"
14 | ]
15 | }
16 | }
17 | ],
18 | "resourceName": "booksearchrest",
19 | "apiName": "booksearchrest",
20 | "functionArns": [
21 | {
22 | "lambdaFunction": "booksearchrest"
23 | }
24 | ],
25 | "privacy": {
26 | "auth": 1,
27 | "unauth": 0,
28 | "authRoleName": "amplify-amplifyvuesearchexam-test-32836-authRole",
29 | "unAuthRoleName": "amplify-amplifyvuesearchexam-test-32836-unauthRole"
30 | },
31 | "dependsOn": [
32 | {
33 | "category": "function",
34 | "resourceName": "booksearchrest",
35 | "attributes": [
36 | "Name",
37 | "Arn"
38 | ]
39 | }
40 | ]
41 | }
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchrest/booksearchrest-cloudformation-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "API Gateway resource stack creation using Amplify CLI",
4 |
5 | "Parameters": {
6 | "authRoleName": {
7 | "Type": "String"
8 | },
9 | "unauthRoleName": {
10 | "Type": "String"
11 | },
12 | "env": {
13 | "Type": "String"
14 | },
15 |
16 |
17 | "functionbooksearchrestName": {
18 | "Type": "String",
19 | "Default": "functionbooksearchrestName"
20 | },
21 |
22 |
23 | "functionbooksearchrestArn": {
24 | "Type": "String",
25 | "Default": "functionbooksearchrestArn"
26 | }
27 |
28 |
29 |
30 |
31 | },
32 | "Conditions": {
33 | "ShouldNotCreateEnvResources": {
34 | "Fn::Equals": [
35 | {
36 | "Ref": "env"
37 | },
38 | "NONE"
39 | ]
40 | }
41 | },
42 | "Resources": {
43 |
44 | "PolicyAPIGWbooksearchrestauth": {
45 | "DependsOn": [
46 | "booksearchrest"
47 | ],
48 | "Type": "AWS::IAM::Policy",
49 | "Properties": {
50 | "PolicyName": "PolicyAPIGWbooksearchrestauth",
51 | "Roles": [
52 | {"Ref": "authRoleName"}
53 | ],
54 | "PolicyDocument": {
55 | "Version": "2012-10-17",
56 | "Statement": [
57 | {
58 | "Effect": "Allow",
59 | "Action": [
60 | "execute-api:Invoke"
61 | ],
62 | "Resource": [
63 |
64 |
65 |
66 | {
67 | "Fn::Join": [
68 | "",
69 | [
70 | "arn:aws:execute-api:",
71 | {
72 | "Ref": "AWS::Region"
73 | },
74 | ":",
75 | {
76 | "Ref": "AWS::AccountId"
77 | },
78 | ":",
79 | {
80 | "Ref": "booksearchrest"
81 | },
82 | "/",
83 | {
84 | "Fn::If": [
85 | "ShouldNotCreateEnvResources",
86 | "Prod",
87 | {
88 | "Ref": "env"
89 | }
90 | ]
91 | },
92 | "/POST",
93 | "/book/*"
94 | ]
95 | ]
96 | },
97 | {
98 | "Fn::Join": [
99 | "",
100 | [
101 | "arn:aws:execute-api:",
102 | {
103 | "Ref": "AWS::Region"
104 | },
105 | ":",
106 | {
107 | "Ref": "AWS::AccountId"
108 | },
109 | ":",
110 | {
111 | "Ref": "booksearchrest"
112 | },
113 | "/",
114 | {
115 | "Fn::If": [
116 | "ShouldNotCreateEnvResources",
117 | "Prod",
118 | {
119 | "Ref": "env"
120 | }
121 | ]
122 | },
123 | "/POST",
124 | "/book"
125 | ]
126 | ]
127 | }
128 |
129 | ,
130 |
131 |
132 | {
133 | "Fn::Join": [
134 | "",
135 | [
136 | "arn:aws:execute-api:",
137 | {
138 | "Ref": "AWS::Region"
139 | },
140 | ":",
141 | {
142 | "Ref": "AWS::AccountId"
143 | },
144 | ":",
145 | {
146 | "Ref": "booksearchrest"
147 | },
148 | "/",
149 | {
150 | "Fn::If": [
151 | "ShouldNotCreateEnvResources",
152 | "Prod",
153 | {
154 | "Ref": "env"
155 | }
156 | ]
157 | },
158 | "/GET",
159 | "/book/*"
160 | ]
161 | ]
162 | },
163 | {
164 | "Fn::Join": [
165 | "",
166 | [
167 | "arn:aws:execute-api:",
168 | {
169 | "Ref": "AWS::Region"
170 | },
171 | ":",
172 | {
173 | "Ref": "AWS::AccountId"
174 | },
175 | ":",
176 | {
177 | "Ref": "booksearchrest"
178 | },
179 | "/",
180 | {
181 | "Fn::If": [
182 | "ShouldNotCreateEnvResources",
183 | "Prod",
184 | {
185 | "Ref": "env"
186 | }
187 | ]
188 | },
189 | "/GET",
190 | "/book"
191 | ]
192 | ]
193 | }
194 |
195 | ,
196 |
197 |
198 | {
199 | "Fn::Join": [
200 | "",
201 | [
202 | "arn:aws:execute-api:",
203 | {
204 | "Ref": "AWS::Region"
205 | },
206 | ":",
207 | {
208 | "Ref": "AWS::AccountId"
209 | },
210 | ":",
211 | {
212 | "Ref": "booksearchrest"
213 | },
214 | "/",
215 | {
216 | "Fn::If": [
217 | "ShouldNotCreateEnvResources",
218 | "Prod",
219 | {
220 | "Ref": "env"
221 | }
222 | ]
223 | },
224 | "/PUT",
225 | "/book/*"
226 | ]
227 | ]
228 | },
229 | {
230 | "Fn::Join": [
231 | "",
232 | [
233 | "arn:aws:execute-api:",
234 | {
235 | "Ref": "AWS::Region"
236 | },
237 | ":",
238 | {
239 | "Ref": "AWS::AccountId"
240 | },
241 | ":",
242 | {
243 | "Ref": "booksearchrest"
244 | },
245 | "/",
246 | {
247 | "Fn::If": [
248 | "ShouldNotCreateEnvResources",
249 | "Prod",
250 | {
251 | "Ref": "env"
252 | }
253 | ]
254 | },
255 | "/PUT",
256 | "/book"
257 | ]
258 | ]
259 | }
260 |
261 | ,
262 |
263 |
264 | {
265 | "Fn::Join": [
266 | "",
267 | [
268 | "arn:aws:execute-api:",
269 | {
270 | "Ref": "AWS::Region"
271 | },
272 | ":",
273 | {
274 | "Ref": "AWS::AccountId"
275 | },
276 | ":",
277 | {
278 | "Ref": "booksearchrest"
279 | },
280 | "/",
281 | {
282 | "Fn::If": [
283 | "ShouldNotCreateEnvResources",
284 | "Prod",
285 | {
286 | "Ref": "env"
287 | }
288 | ]
289 | },
290 | "/PATCH",
291 | "/book/*"
292 | ]
293 | ]
294 | },
295 | {
296 | "Fn::Join": [
297 | "",
298 | [
299 | "arn:aws:execute-api:",
300 | {
301 | "Ref": "AWS::Region"
302 | },
303 | ":",
304 | {
305 | "Ref": "AWS::AccountId"
306 | },
307 | ":",
308 | {
309 | "Ref": "booksearchrest"
310 | },
311 | "/",
312 | {
313 | "Fn::If": [
314 | "ShouldNotCreateEnvResources",
315 | "Prod",
316 | {
317 | "Ref": "env"
318 | }
319 | ]
320 | },
321 | "/PATCH",
322 | "/book"
323 | ]
324 | ]
325 | }
326 |
327 | ,
328 |
329 |
330 | {
331 | "Fn::Join": [
332 | "",
333 | [
334 | "arn:aws:execute-api:",
335 | {
336 | "Ref": "AWS::Region"
337 | },
338 | ":",
339 | {
340 | "Ref": "AWS::AccountId"
341 | },
342 | ":",
343 | {
344 | "Ref": "booksearchrest"
345 | },
346 | "/",
347 | {
348 | "Fn::If": [
349 | "ShouldNotCreateEnvResources",
350 | "Prod",
351 | {
352 | "Ref": "env"
353 | }
354 | ]
355 | },
356 | "/DELETE",
357 | "/book/*"
358 | ]
359 | ]
360 | },
361 | {
362 | "Fn::Join": [
363 | "",
364 | [
365 | "arn:aws:execute-api:",
366 | {
367 | "Ref": "AWS::Region"
368 | },
369 | ":",
370 | {
371 | "Ref": "AWS::AccountId"
372 | },
373 | ":",
374 | {
375 | "Ref": "booksearchrest"
376 | },
377 | "/",
378 | {
379 | "Fn::If": [
380 | "ShouldNotCreateEnvResources",
381 | "Prod",
382 | {
383 | "Ref": "env"
384 | }
385 | ]
386 | },
387 | "/DELETE",
388 | "/book"
389 | ]
390 | ]
391 | }
392 |
393 |
394 |
395 |
396 |
397 | ]
398 | }
399 | ]
400 | }
401 | }
402 | },
403 |
404 |
405 |
406 |
407 |
408 | "booksearchrest": {
409 | "Type": "AWS::ApiGateway::RestApi",
410 | "Properties": {
411 | "Description": "",
412 | "Name": "booksearchrest",
413 | "Body": {
414 | "swagger": "2.0",
415 | "info": {
416 | "version": "2018-05-24T17:52:00Z",
417 | "title": "booksearchrest"
418 | },
419 | "host": {
420 | "Fn::Join": [
421 | "",
422 | [
423 | "apigateway.",
424 | {
425 | "Ref": "AWS::Region"
426 | },
427 | ".amazonaws.com"
428 | ]
429 | ]
430 | },
431 | "basePath": {
432 | "Fn::If": [
433 | "ShouldNotCreateEnvResources",
434 | "/Prod",
435 | {
436 | "Fn::Join": [
437 | "",
438 | [
439 | "/",
440 | {
441 | "Ref": "env"
442 | }
443 | ]
444 | ]
445 | }
446 | ]
447 | },
448 | "schemes": [
449 | "https"
450 | ],
451 | "paths": {
452 |
453 | "/book": {
454 | "options": {
455 | "consumes": [
456 | "application/json"
457 | ],
458 | "produces": [
459 | "application/json"
460 | ],
461 | "responses": {
462 | "200": {
463 | "description": "200 response",
464 | "headers": {
465 | "Access-Control-Allow-Origin": {
466 | "type": "string"
467 | },
468 | "Access-Control-Allow-Methods": {
469 | "type": "string"
470 | },
471 | "Access-Control-Allow-Headers": {
472 | "type": "string"
473 | }
474 | }
475 | }
476 | },
477 | "x-amazon-apigateway-integration": {
478 | "responses": {
479 | "default": {
480 | "statusCode": "200",
481 | "responseParameters": {
482 | "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'",
483 | "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'",
484 | "method.response.header.Access-Control-Allow-Origin": "'*'"
485 | }
486 | }
487 | },
488 | "requestTemplates": {
489 | "application/json": "{\"statusCode\": 200}"
490 | },
491 | "passthroughBehavior": "when_no_match",
492 | "type": "mock"
493 | }
494 | },
495 | "x-amazon-apigateway-any-method": {
496 | "consumes": [
497 | "application/json"
498 | ],
499 | "produces": [
500 | "application/json"
501 | ],
502 | "parameters": [
503 | {
504 | "in": "body",
505 | "name": "RequestSchema",
506 | "required": false,
507 | "schema": {
508 | "$ref": "#/definitions/RequestSchema"
509 | }
510 | }
511 | ],
512 | "responses": {
513 | "200": {
514 | "description": "200 response",
515 | "schema": {
516 | "$ref": "#/definitions/ResponseSchema"
517 | }
518 | }
519 | },
520 |
521 | "security": [
522 | {
523 | "sigv4": []
524 | }
525 | ],
526 |
527 | "x-amazon-apigateway-integration": {
528 | "responses": {
529 | "default": {
530 | "statusCode": "200"
531 | }
532 | },
533 | "uri": {
534 | "Fn::Join": [
535 | "",
536 | [
537 | "arn:aws:apigateway:",
538 | {
539 | "Ref": "AWS::Region"
540 | },
541 | ":lambda:path/2015-03-31/functions/",
542 |
543 | {
544 |
545 | "Ref": "functionbooksearchrestArn"
546 | },
547 |
548 | "/invocations"
549 | ]
550 | ]
551 | },
552 | "passthroughBehavior": "when_no_match",
553 | "httpMethod": "POST",
554 | "type": "aws_proxy"
555 | }
556 | }
557 | },
558 | "/book/{proxy+}": {
559 | "options": {
560 | "consumes": [
561 | "application/json"
562 | ],
563 | "produces": [
564 | "application/json"
565 | ],
566 | "responses": {
567 | "200": {
568 | "description": "200 response",
569 | "headers": {
570 | "Access-Control-Allow-Origin": {
571 | "type": "string"
572 | },
573 | "Access-Control-Allow-Methods": {
574 | "type": "string"
575 | },
576 | "Access-Control-Allow-Headers": {
577 | "type": "string"
578 | }
579 | }
580 | }
581 | },
582 | "x-amazon-apigateway-integration": {
583 | "responses": {
584 | "default": {
585 | "statusCode": "200",
586 | "responseParameters": {
587 | "method.response.header.Access-Control-Allow-Methods": "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'",
588 | "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'",
589 | "method.response.header.Access-Control-Allow-Origin": "'*'"
590 | }
591 | }
592 | },
593 | "requestTemplates": {
594 | "application/json": "{\"statusCode\": 200}"
595 | },
596 | "passthroughBehavior": "when_no_match",
597 | "type": "mock"
598 | }
599 | },
600 | "x-amazon-apigateway-any-method": {
601 | "consumes": [
602 | "application/json"
603 | ],
604 | "produces": [
605 | "application/json"
606 | ],
607 | "parameters": [
608 | {
609 | "in": "body",
610 | "name": "RequestSchema",
611 | "required": false,
612 | "schema": {
613 | "$ref": "#/definitions/RequestSchema"
614 | }
615 | }
616 | ],
617 | "responses": {
618 | "200": {
619 | "description": "200 response",
620 | "schema": {
621 | "$ref": "#/definitions/ResponseSchema"
622 | }
623 | }
624 | },
625 |
626 | "security": [
627 | {
628 | "sigv4": []
629 | }
630 | ],
631 |
632 | "x-amazon-apigateway-integration": {
633 | "responses": {
634 | "default": {
635 | "statusCode": "200"
636 | }
637 | },
638 | "uri": {
639 | "Fn::Join": [
640 | "",
641 | [
642 | "arn:aws:apigateway:",
643 | {
644 | "Ref": "AWS::Region"
645 | },
646 | ":lambda:path/2015-03-31/functions/",
647 |
648 | {
649 |
650 | "Ref": "functionbooksearchrestArn"
651 | },
652 |
653 | "/invocations"
654 | ]
655 | ]
656 | },
657 | "passthroughBehavior": "when_no_match",
658 | "httpMethod": "POST",
659 | "type": "aws_proxy"
660 | }
661 | }
662 | }
663 |
664 | },
665 | "securityDefinitions": {
666 | "sigv4": {
667 | "type": "apiKey",
668 | "name": "Authorization",
669 | "in": "header",
670 | "x-amazon-apigateway-authtype": "awsSigv4"
671 | }
672 | },
673 | "definitions": {
674 | "RequestSchema": {
675 | "type": "object",
676 | "required": [
677 | "request"
678 | ],
679 | "properties": {
680 | "request": {
681 | "type": "string"
682 | }
683 | },
684 | "title": "Request Schema"
685 | },
686 | "ResponseSchema": {
687 | "type": "object",
688 | "required": [
689 | "response"
690 | ],
691 | "properties": {
692 | "response": {
693 | "type": "string"
694 | }
695 | },
696 | "title": "Response Schema"
697 | }
698 | }
699 | },
700 | "FailOnWarnings": true
701 | }
702 | },
703 |
704 |
705 |
706 |
707 | "functionbooksearchrestPermissionbooksearchrest": {
708 | "Type": "AWS::Lambda::Permission",
709 | "Properties": {
710 | "FunctionName":
711 | {
712 | "Ref": "functionbooksearchrestName"
713 | },
714 |
715 | "Action": "lambda:InvokeFunction",
716 | "Principal": "apigateway.amazonaws.com",
717 | "SourceArn": {
718 | "Fn::Join": [
719 | "",
720 | [
721 | "arn:aws:execute-api:",
722 | {
723 | "Ref": "AWS::Region"
724 | },
725 | ":",
726 | {
727 | "Ref": "AWS::AccountId"
728 | },
729 | ":",
730 | {
731 | "Ref": "booksearchrest"
732 | },
733 | "/*/*/*"
734 | ]
735 | ]
736 | }
737 | }
738 | },
739 |
740 |
741 |
742 | "DeploymentAPIGWbooksearchrest": {
743 | "Type": "AWS::ApiGateway::Deployment",
744 | "Properties": {
745 | "Description": "The Development stage deployment of your API.",
746 | "StageName": {
747 | "Fn::If": [
748 | "ShouldNotCreateEnvResources",
749 | "Prod",
750 | {
751 | "Ref": "env"
752 | }
753 | ]
754 | },
755 | "RestApiId": {
756 | "Ref": "booksearchrest"
757 | }
758 | }
759 | }
760 | },
761 | "Outputs": {
762 | "RootUrl": {
763 | "Description": "Root URL of the API gateway",
764 | "Value": {"Fn::Join": ["", ["https://", {"Ref": "booksearchrest"}, ".execute-api.", {"Ref": "AWS::Region"}, ".amazonaws.com/", {"Fn::If": ["ShouldNotCreateEnvResources","Prod", {"Ref": "env"} ]}]]}
765 | },
766 | "ApiName": {
767 | "Description": "API Friendly name",
768 | "Value": "booksearchrest"
769 | },
770 | "ApiId": {
771 | "Description": "API ID (prefix of API URL)",
772 | "Value": {"Ref": "booksearchrest"}
773 | }
774 | }
775 | }
776 |
--------------------------------------------------------------------------------
/amplify/backend/api/booksearchrest/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "authRoleName": {
3 | "Ref": "AuthRoleName"
4 | },
5 | "unauthRoleName": {
6 | "Ref": "UnauthRoleName"
7 | }
8 | }
--------------------------------------------------------------------------------
/amplify/backend/auth/amplifyvuesearchexam21160aeb/amplifyvuesearchexam21160aeb-cloudformation-template.yml:
--------------------------------------------------------------------------------
1 | AWSTemplateFormatVersion: 2010-09-09
2 |
3 | Parameters:
4 | env:
5 | Type: String
6 | authRoleArn:
7 | Type: String
8 | unauthRoleArn:
9 | Type: String
10 |
11 |
12 |
13 |
14 | identityPoolName:
15 | Type: String
16 |
17 | allowUnauthenticatedIdentities:
18 | Type: String
19 |
20 | resourceNameTruncated:
21 | Type: String
22 |
23 | userPoolName:
24 | Type: String
25 |
26 | autoVerifiedAttributes:
27 | Type: CommaDelimitedList
28 |
29 | mfaConfiguration:
30 | Type: String
31 |
32 | mfaTypes:
33 | Type: CommaDelimitedList
34 |
35 | smsAuthenticationMessage:
36 | Type: String
37 |
38 | smsVerificationMessage:
39 | Type: String
40 |
41 | emailVerificationSubject:
42 | Type: String
43 |
44 | emailVerificationMessage:
45 | Type: String
46 |
47 | defaultPasswordPolicy:
48 | Type: String
49 |
50 | passwordPolicyMinLength:
51 | Type: Number
52 |
53 | passwordPolicyCharacters:
54 | Type: CommaDelimitedList
55 |
56 | requiredAttributes:
57 | Type: CommaDelimitedList
58 |
59 | userpoolClientGenerateSecret:
60 | Type: String
61 |
62 | userpoolClientRefreshTokenValidity:
63 | Type: Number
64 |
65 | userpoolClientWriteAttributes:
66 | Type: CommaDelimitedList
67 |
68 | userpoolClientReadAttributes:
69 | Type: CommaDelimitedList
70 |
71 | userpoolClientLambdaRole:
72 | Type: String
73 |
74 | userpoolClientSetAttributes:
75 | Type: String
76 |
77 | resourceName:
78 | Type: String
79 |
80 | authSelections:
81 | Type: String
82 |
83 | useDefault:
84 | Type: String
85 |
86 | userPoolGroupList:
87 | Type: CommaDelimitedList
88 |
89 | dependsOn:
90 | Type: CommaDelimitedList
91 |
92 | Conditions:
93 | ShouldNotCreateEnvResources: !Equals [ !Ref env, NONE ]
94 |
95 | Resources:
96 |
97 |
98 | # BEGIN SNS ROLE RESOURCE
99 | SNSRole:
100 | # Created to allow the UserPool SMS Config to publish via the Simple Notification Service during MFA Process
101 | Type: AWS::IAM::Role
102 | Properties:
103 | RoleName: !If [ShouldNotCreateEnvResources, 'amplif21160aeb_sns-role', !Join ['',[ 'sns', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
104 | AssumeRolePolicyDocument:
105 | Version: "2012-10-17"
106 | Statement:
107 | - Sid: ""
108 | Effect: "Allow"
109 | Principal:
110 | Service: "cognito-idp.amazonaws.com"
111 | Action:
112 | - "sts:AssumeRole"
113 | Condition:
114 | StringEquals:
115 | sts:ExternalId: amplif21160aeb_role_external_id
116 | Policies:
117 | -
118 | PolicyName: amplif21160aeb-sns-policy
119 | PolicyDocument:
120 | Version: "2012-10-17"
121 | Statement:
122 | -
123 | Effect: "Allow"
124 | Action:
125 | - "sns:Publish"
126 | Resource: "*"
127 | # BEGIN USER POOL RESOURCES
128 | UserPool:
129 | # Created upon user selection
130 | # Depends on SNS Role for Arn if MFA is enabled
131 | Type: AWS::Cognito::UserPool
132 | UpdateReplacePolicy: Retain
133 | Properties:
134 | UserPoolName: !If [ShouldNotCreateEnvResources, !Ref userPoolName, !Join ['',[!Ref userPoolName, '-', !Ref env]]]
135 |
136 | Schema:
137 |
138 | -
139 | Name: email
140 | Required: true
141 | Mutable: true
142 |
143 |
144 |
145 |
146 | AutoVerifiedAttributes: !Ref autoVerifiedAttributes
147 |
148 |
149 | EmailVerificationMessage: !Ref emailVerificationMessage
150 | EmailVerificationSubject: !Ref emailVerificationSubject
151 |
152 | Policies:
153 | PasswordPolicy:
154 | MinimumLength: !Ref passwordPolicyMinLength
155 | RequireLowercase: false
156 | RequireNumbers: false
157 | RequireSymbols: false
158 | RequireUppercase: false
159 |
160 | MfaConfiguration: !Ref mfaConfiguration
161 | SmsVerificationMessage: !Ref smsVerificationMessage
162 | SmsConfiguration:
163 | SnsCallerArn: !GetAtt SNSRole.Arn
164 | ExternalId: amplif21160aeb_role_external_id
165 |
166 |
167 | UserPoolClientWeb:
168 | # Created provide application access to user pool
169 | # Depends on UserPool for ID reference
170 | Type: "AWS::Cognito::UserPoolClient"
171 | Properties:
172 | ClientName: amplif21160aeb_app_clientWeb
173 |
174 | RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
175 | UserPoolId: !Ref UserPool
176 | DependsOn: UserPool
177 | UserPoolClient:
178 | # Created provide application access to user pool
179 | # Depends on UserPool for ID reference
180 | Type: "AWS::Cognito::UserPoolClient"
181 | Properties:
182 | ClientName: amplif21160aeb_app_client
183 |
184 | GenerateSecret: !Ref userpoolClientGenerateSecret
185 | RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
186 | UserPoolId: !Ref UserPool
187 | DependsOn: UserPool
188 | # BEGIN USER POOL LAMBDA RESOURCES
189 | UserPoolClientRole:
190 | # Created to execute Lambda which gets userpool app client config values
191 | Type: 'AWS::IAM::Role'
192 | Properties:
193 | RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
194 | AssumeRolePolicyDocument:
195 | Version: '2012-10-17'
196 | Statement:
197 | - Effect: Allow
198 | Principal:
199 | Service:
200 | - lambda.amazonaws.com
201 | Action:
202 | - 'sts:AssumeRole'
203 | DependsOn: UserPoolClient
204 | UserPoolClientLambda:
205 | # Lambda which gets userpool app client config values
206 | # Depends on UserPool for id
207 | # Depends on UserPoolClientRole for role ARN
208 | Type: 'AWS::Lambda::Function'
209 | Properties:
210 | Code:
211 | ZipFile: !Join
212 | - |+
213 | - - 'const response = require(''cfn-response'');'
214 | - 'const aws = require(''aws-sdk'');'
215 | - 'const identity = new aws.CognitoIdentityServiceProvider();'
216 | - 'exports.handler = (event, context, callback) => {'
217 | - ' if (event.RequestType == ''Delete'') { '
218 | - ' response.send(event, context, response.SUCCESS, {})'
219 | - ' }'
220 | - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {'
221 | - ' const params = {'
222 | - ' ClientId: event.ResourceProperties.clientId,'
223 | - ' UserPoolId: event.ResourceProperties.userpoolId'
224 | - ' };'
225 | - ' identity.describeUserPoolClient(params).promise()'
226 | - ' .then((res) => {'
227 | - ' response.send(event, context, response.SUCCESS, {''appSecret'': res.UserPoolClient.ClientSecret});'
228 | - ' })'
229 | - ' .catch((err) => {'
230 | - ' response.send(event, context, response.FAILED, {err});'
231 | - ' });'
232 | - ' }'
233 | - '};'
234 | Handler: index.handler
235 | Runtime: nodejs10.x
236 | Timeout: '300'
237 | Role: !GetAtt
238 | - UserPoolClientRole
239 | - Arn
240 | DependsOn: UserPoolClientRole
241 | UserPoolClientLambdaPolicy:
242 | # Sets userpool policy for the role that executes the Userpool Client Lambda
243 | # Depends on UserPool for Arn
244 | # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing
245 | Type: 'AWS::IAM::Policy'
246 | Properties:
247 | PolicyName: amplif21160aeb_userpoolclient_lambda_iam_policy
248 | Roles:
249 | - !Ref UserPoolClientRole
250 | PolicyDocument:
251 | Version: '2012-10-17'
252 | Statement:
253 | - Effect: Allow
254 | Action:
255 | - 'cognito-idp:DescribeUserPoolClient'
256 | Resource: !GetAtt UserPool.Arn
257 | DependsOn: UserPoolClientLambda
258 | UserPoolClientLogPolicy:
259 | # Sets log policy for the role that executes the Userpool Client Lambda
260 | # Depends on UserPool for Arn
261 | # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing
262 | Type: 'AWS::IAM::Policy'
263 | Properties:
264 | PolicyName: amplif21160aeb_userpoolclient_lambda_log_policy
265 | Roles:
266 | - !Ref UserPoolClientRole
267 | PolicyDocument:
268 | Version: 2012-10-17
269 | Statement:
270 | - Effect: Allow
271 | Action:
272 | - 'logs:CreateLogGroup'
273 | - 'logs:CreateLogStream'
274 | - 'logs:PutLogEvents'
275 | Resource: !Sub
276 | - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*
277 | - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref UserPoolClientLambda}
278 | DependsOn: UserPoolClientLambdaPolicy
279 | UserPoolClientInputs:
280 | # Values passed to Userpool client Lambda
281 | # Depends on UserPool for Id
282 | # Depends on UserPoolClient for Id
283 | # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing
284 | Type: 'Custom::LambdaCallout'
285 | Properties:
286 | ServiceToken: !GetAtt UserPoolClientLambda.Arn
287 | clientId: !Ref UserPoolClient
288 | userpoolId: !Ref UserPool
289 | DependsOn: UserPoolClientLogPolicy
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 | # BEGIN IDENTITY POOL RESOURCES
298 |
299 |
300 | IdentityPool:
301 | # Always created
302 | Type: AWS::Cognito::IdentityPool
303 | Properties:
304 | IdentityPoolName: !If [ShouldNotCreateEnvResources, 'amplifyvuesearchexam21160aeb_identitypool_21160aeb', !Join ['',['amplifyvuesearchexam21160aeb_identitypool_21160aeb', '__', !Ref env]]]
305 |
306 | CognitoIdentityProviders:
307 | - ClientId: !Ref UserPoolClient
308 | ProviderName: !Sub
309 | - cognito-idp.${region}.amazonaws.com/${client}
310 | - { region: !Ref "AWS::Region", client: !Ref UserPool}
311 | - ClientId: !Ref UserPoolClientWeb
312 | ProviderName: !Sub
313 | - cognito-idp.${region}.amazonaws.com/${client}
314 | - { region: !Ref "AWS::Region", client: !Ref UserPool}
315 |
316 | AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities
317 |
318 |
319 | DependsOn: UserPoolClientInputs
320 |
321 |
322 | IdentityPoolRoleMap:
323 | # Created to map Auth and Unauth roles to the identity pool
324 | # Depends on Identity Pool for ID ref
325 | Type: AWS::Cognito::IdentityPoolRoleAttachment
326 | Properties:
327 | IdentityPoolId: !Ref IdentityPool
328 | Roles:
329 | unauthenticated: !Ref unauthRoleArn
330 | authenticated: !Ref authRoleArn
331 | DependsOn: IdentityPool
332 |
333 |
334 | Outputs :
335 |
336 | IdentityPoolId:
337 | Value: !Ref 'IdentityPool'
338 | Description: Id for the identity pool
339 | IdentityPoolName:
340 | Value: !GetAtt IdentityPool.Name
341 |
342 |
343 |
344 |
345 | UserPoolId:
346 | Value: !Ref 'UserPool'
347 | Description: Id for the user pool
348 | UserPoolName:
349 | Value: !Ref userPoolName
350 | AppClientIDWeb:
351 | Value: !Ref 'UserPoolClientWeb'
352 | Description: The user pool app client id for web
353 | AppClientID:
354 | Value: !Ref 'UserPoolClient'
355 | Description: The user pool app client id
356 | AppClientSecret:
357 | Value: !GetAtt UserPoolClientInputs.appSecret
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
--------------------------------------------------------------------------------
/amplify/backend/auth/amplifyvuesearchexam21160aeb/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "identityPoolName": "amplifyvuesearchexam21160aeb_identitypool_21160aeb",
3 | "allowUnauthenticatedIdentities": false,
4 | "resourceNameTruncated": "amplif21160aeb",
5 | "userPoolName": "amplifyvuesearchexam21160aeb_userpool_21160aeb",
6 | "autoVerifiedAttributes": [
7 | "email"
8 | ],
9 | "mfaConfiguration": "OFF",
10 | "mfaTypes": [
11 | "SMS Text Message"
12 | ],
13 | "smsAuthenticationMessage": "Your authentication code is {####}",
14 | "smsVerificationMessage": "Your verification code is {####}",
15 | "emailVerificationSubject": "Your verification code",
16 | "emailVerificationMessage": "Your verification code is {####}",
17 | "defaultPasswordPolicy": false,
18 | "passwordPolicyMinLength": 8,
19 | "passwordPolicyCharacters": [],
20 | "requiredAttributes": [
21 | "email"
22 | ],
23 | "userpoolClientGenerateSecret": true,
24 | "userpoolClientRefreshTokenValidity": 30,
25 | "userpoolClientWriteAttributes": [
26 | "email"
27 | ],
28 | "userpoolClientReadAttributes": [
29 | "email"
30 | ],
31 | "userpoolClientLambdaRole": "amplif21160aeb_userpoolclient_lambda_role",
32 | "userpoolClientSetAttributes": false,
33 | "resourceName": "amplifyvuesearchexam21160aeb",
34 | "authSelections": "identityPoolAndUserPool",
35 | "authRoleArn": {
36 | "Fn::GetAtt": [
37 | "AuthRole",
38 | "Arn"
39 | ]
40 | },
41 | "unauthRoleArn": {
42 | "Fn::GetAtt": [
43 | "UnauthRole",
44 | "Arn"
45 | ]
46 | },
47 | "useDefault": "default",
48 | "userPoolGroupList": [],
49 | "dependsOn": []
50 | }
--------------------------------------------------------------------------------
/amplify/backend/backend-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "auth": {
3 | "amplifyvuesearchexam21160aeb": {
4 | "service": "Cognito",
5 | "providerPlugin": "awscloudformation",
6 | "dependsOn": [],
7 | "customAuth": false
8 | }
9 | },
10 | "api": {
11 | "booksearchgraphql": {
12 | "service": "AppSync",
13 | "providerPlugin": "awscloudformation",
14 | "output": {
15 | "authConfig": {
16 | "additionalAuthenticationProviders": [],
17 | "defaultAuthentication": {
18 | "authenticationType": "AMAZON_COGNITO_USER_POOLS",
19 | "userPoolConfig": {
20 | "userPoolId": "authamplifyvuesearchexam21160aeb"
21 | }
22 | }
23 | }
24 | }
25 | },
26 | "booksearchrest": {
27 | "service": "API Gateway",
28 | "providerPlugin": "awscloudformation",
29 | "dependsOn": [
30 | {
31 | "category": "function",
32 | "resourceName": "booksearchrest",
33 | "attributes": [
34 | "Name",
35 | "Arn"
36 | ]
37 | }
38 | ]
39 | }
40 | },
41 | "storage": {
42 | "booksearchrest": {
43 | "service": "DynamoDB",
44 | "providerPlugin": "awscloudformation"
45 | }
46 | },
47 | "function": {
48 | "booksearchrest": {
49 | "service": "Lambda",
50 | "providerPlugin": "awscloudformation",
51 | "build": true,
52 | "dependsOn": [
53 | {
54 | "category": "storage",
55 | "resourceName": "booksearchrest",
56 | "attributes": [
57 | "Name",
58 | "Arn"
59 | ]
60 | }
61 | ]
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/booksearchrest-cloudformation-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "Lambda resource stack creation using Amplify CLI",
4 | "Parameters": {
5 | "env": {
6 | "Type": "String"
7 | },
8 |
9 |
10 |
11 | "storagebooksearchrestName": {
12 | "Type": "String",
13 | "Default": "storagebooksearchrestName"
14 | },
15 |
16 | "storagebooksearchrestArn": {
17 | "Type": "String",
18 | "Default": "storagebooksearchrestArn"
19 | }
20 |
21 |
22 |
23 |
24 | },
25 | "Conditions": {
26 | "ShouldNotCreateEnvResources": {
27 | "Fn::Equals": [
28 | {
29 | "Ref": "env"
30 | },
31 | "NONE"
32 | ]
33 | }
34 | },
35 | "Resources": {
36 | "LambdaFunction": {
37 | "Type": "AWS::Lambda::Function",
38 | "Metadata": {
39 | "aws:asset:path": "./src",
40 | "aws:asset:property": "Code"
41 | },
42 | "Properties": {
43 | "Handler": "index.handler",
44 | "FunctionName": {
45 | "Fn::If": [
46 | "ShouldNotCreateEnvResources",
47 | "booksearchrest",
48 | {
49 |
50 | "Fn::Join": [
51 | "",
52 | [
53 | "booksearchrest",
54 | "-",
55 | {
56 | "Ref": "env"
57 | }
58 | ]
59 | ]
60 | }
61 | ]
62 | },
63 | "Environment": {
64 | "Variables" : {
65 | "ENV": {
66 | "Ref": "env"
67 | },
68 | "REGION": {
69 | "Ref": "AWS::Region"
70 | }
71 |
72 | }
73 | },
74 | "Role": { "Fn::GetAtt" : ["LambdaExecutionRole", "Arn"] },
75 | "Runtime": "nodejs10.x",
76 | "Timeout": "25"
77 | }
78 | },
79 | "LambdaExecutionRole": {
80 | "Type": "AWS::IAM::Role",
81 | "Properties": {
82 | "RoleName": {
83 | "Fn::If": [
84 | "ShouldNotCreateEnvResources",
85 | "amplifyvuesearchexamLambdaRoleaaf7dbca",
86 | {
87 |
88 | "Fn::Join": [
89 | "",
90 | [
91 | "amplifyvuesearchexamLambdaRoleaaf7dbca",
92 | "-",
93 | {
94 | "Ref": "env"
95 | }
96 | ]
97 | ]
98 | }
99 | ]
100 | },
101 | "AssumeRolePolicyDocument": {
102 | "Version": "2012-10-17",
103 | "Statement": [
104 | {
105 | "Effect": "Allow",
106 | "Principal": {
107 | "Service": [
108 | "lambda.amazonaws.com"
109 | ]
110 | },
111 | "Action": [
112 | "sts:AssumeRole"
113 | ]
114 | }
115 | ]
116 | }
117 | }
118 | }
119 | ,"lambdaexecutionpolicy": {
120 | "DependsOn": ["LambdaExecutionRole"],
121 | "Type": "AWS::IAM::Policy",
122 | "Properties": {
123 | "PolicyName": "lambda-execution-policy",
124 | "Roles": [{ "Ref": "LambdaExecutionRole" }],
125 | "PolicyDocument": {
126 | "Version": "2012-10-17",
127 | "Statement": [
128 | {
129 | "Effect": "Allow",
130 | "Action":["logs:CreateLogGroup",
131 | "logs:CreateLogStream",
132 | "logs:PutLogEvents"],
133 | "Resource": { "Fn::Sub" : [ "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", { "region": {"Ref": "AWS::Region"}, "account": {"Ref": "AWS::AccountId"}, "lambda": {"Ref": "LambdaFunction"}} ]}
134 | },
135 | {
136 | "Effect": "Allow",
137 | "Action": ["dynamodb:GetItem","dynamodb:Query","dynamodb:Scan","dynamodb:PutItem","dynamodb:UpdateItem","dynamodb:DeleteItem"],
138 | "Resource": [
139 |
140 | { "Ref": "storagebooksearchrestArn" },
141 | {
142 | "Fn::Join": [
143 | "/",
144 | [
145 | { "Ref": "storagebooksearchrestArn" },
146 | "index/*"
147 | ]
148 | ]
149 | }
150 |
151 | ]
152 | }
153 |
154 | ]
155 | }
156 | }
157 | }
158 |
159 | },
160 | "Outputs": {
161 | "Name": {
162 | "Value": {
163 | "Ref": "LambdaFunction"
164 | }
165 | },
166 | "Arn": {
167 | "Value": {"Fn::GetAtt": ["LambdaFunction", "Arn"]}
168 | },
169 | "Region": {
170 | "Value": {
171 | "Ref": "AWS::Region"
172 | }
173 | },
174 | "LambdaExecutionRole": {
175 | "Value": {
176 | "Ref": "LambdaExecutionRole"
177 | }
178 | }
179 | }
180 | }
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/function-parameters.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/src/app.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 - 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 | Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
4 | http://aws.amazon.com/apache2.0/
5 | or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6 | See the License for the specific language governing permissions and limitations under the License.
7 | */
8 |
9 |
10 |
11 | const AWS = require('aws-sdk')
12 | var awsServerlessExpressMiddleware = require('aws-serverless-express/middleware')
13 | var bodyParser = require('body-parser')
14 | var express = require('express')
15 |
16 | AWS.config.update({ region: process.env.TABLE_REGION });
17 |
18 | const dynamodb = new AWS.DynamoDB.DocumentClient();
19 |
20 | let tableName = "booksearchrest";
21 | if(process.env.ENV && process.env.ENV !== "NONE") {
22 | tableName = tableName + '-' + process.env.ENV;
23 | }
24 |
25 | const userIdPresent = false; // TODO: update in case is required to use that definition
26 | const partitionKeyName = "author";
27 | const partitionKeyType = "S";
28 | const sortKeyName = "releaseDate";
29 | const sortKeyType = "S";
30 | const hasSortKey = sortKeyName !== "";
31 | const path = "/book";
32 | const UNAUTH = 'UNAUTH';
33 | const hashKeyPath = '/:' + partitionKeyName;
34 | const sortKeyPath = hasSortKey ? '/:' + sortKeyName : '';
35 | // declare a new express app
36 | var app = express()
37 | app.use(bodyParser.json())
38 | app.use(awsServerlessExpressMiddleware.eventContext())
39 |
40 | // Enable CORS for all methods
41 | app.use(function(req, res, next) {
42 | res.header("Access-Control-Allow-Origin", "*")
43 | res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept")
44 | next()
45 | });
46 |
47 | // convert url string param to expected Type
48 | const convertUrlType = (param, type) => {
49 | switch(type) {
50 | case "N":
51 | return Number.parseInt(param);
52 | default:
53 | return param;
54 | }
55 | }
56 |
57 | /********************************
58 | * HTTP Get method for list objects *
59 | ********************************/
60 |
61 | app.get(path + hashKeyPath, function(req, res) {
62 | var condition = {}
63 | condition[partitionKeyName] = {
64 | ComparisonOperator: 'EQ'
65 | }
66 |
67 | if (userIdPresent && req.apiGateway) {
68 | condition[partitionKeyName]['AttributeValueList'] = [req.apiGateway.event.requestContext.identity.cognitoIdentityId || UNAUTH ];
69 | } else {
70 | try {
71 | condition[partitionKeyName]['AttributeValueList'] = [ convertUrlType(req.params[partitionKeyName], partitionKeyType) ];
72 | } catch(err) {
73 | res.statusCode = 500;
74 | res.json({error: 'Wrong column type ' + err});
75 | }
76 | }
77 |
78 | let queryParams = {
79 | TableName: tableName,
80 | KeyConditions: condition
81 | }
82 |
83 | dynamodb.query(queryParams, (err, data) => {
84 | if (err) {
85 | res.statusCode = 500;
86 | res.json({error: 'Could not load items: ' + err});
87 | } else {
88 | res.json(data.Items);
89 | }
90 | });
91 | });
92 |
93 | /*****************************************
94 | * HTTP Get method for get single object *
95 | *****************************************/
96 |
97 | app.get(path + '/object' + hashKeyPath + sortKeyPath, function(req, res) {
98 | var params = {};
99 | if (userIdPresent && req.apiGateway) {
100 | params[partitionKeyName] = req.apiGateway.event.requestContext.identity.cognitoIdentityId || UNAUTH;
101 | } else {
102 | params[partitionKeyName] = req.params[partitionKeyName];
103 | try {
104 | params[partitionKeyName] = convertUrlType(req.params[partitionKeyName], partitionKeyType);
105 | } catch(err) {
106 | res.statusCode = 500;
107 | res.json({error: 'Wrong column type ' + err});
108 | }
109 | }
110 | if (hasSortKey) {
111 | try {
112 | params[sortKeyName] = convertUrlType(req.params[sortKeyName], sortKeyType);
113 | } catch(err) {
114 | res.statusCode = 500;
115 | res.json({error: 'Wrong column type ' + err});
116 | }
117 | }
118 |
119 | let getItemParams = {
120 | TableName: tableName,
121 | Key: params
122 | }
123 |
124 | dynamodb.get(getItemParams,(err, data) => {
125 | if(err) {
126 | res.statusCode = 500;
127 | res.json({error: 'Could not load items: ' + err.message});
128 | } else {
129 | if (data.Item) {
130 | res.json(data.Item);
131 | } else {
132 | res.json(data) ;
133 | }
134 | }
135 | });
136 | });
137 |
138 |
139 | /************************************
140 | * HTTP put method for insert object *
141 | *************************************/
142 |
143 | app.put(path, function(req, res) {
144 |
145 | if (userIdPresent) {
146 | req.body['userId'] = req.apiGateway.event.requestContext.identity.cognitoIdentityId || UNAUTH;
147 | }
148 |
149 | let putItemParams = {
150 | TableName: tableName,
151 | Item: req.body
152 | }
153 | dynamodb.put(putItemParams, (err, data) => {
154 | if(err) {
155 | res.statusCode = 500;
156 | res.json({error: err, url: req.url, body: req.body});
157 | } else{
158 | res.json({success: 'put call succeed!', url: req.url, data: data})
159 | }
160 | });
161 | });
162 |
163 | /************************************
164 | * HTTP post method for insert object *
165 | *************************************/
166 |
167 | app.post(path, function(req, res) {
168 |
169 | if (userIdPresent) {
170 | req.body['userId'] = req.apiGateway.event.requestContext.identity.cognitoIdentityId || UNAUTH;
171 | }
172 |
173 | let putItemParams = {
174 | TableName: tableName,
175 | Item: req.body
176 | }
177 | dynamodb.put(putItemParams, (err, data) => {
178 | if(err) {
179 | res.statusCode = 500;
180 | res.json({error: err, url: req.url, body: req.body});
181 | } else{
182 | res.json({success: 'post call succeed!', url: req.url, data: data})
183 | }
184 | });
185 | });
186 |
187 | /**************************************
188 | * HTTP remove method to delete object *
189 | ***************************************/
190 |
191 | app.delete(path + '/object' + hashKeyPath + sortKeyPath, function(req, res) {
192 | var params = {};
193 | if (userIdPresent && req.apiGateway) {
194 | params[partitionKeyName] = req.apiGateway.event.requestContext.identity.cognitoIdentityId || UNAUTH;
195 | } else {
196 | params[partitionKeyName] = req.params[partitionKeyName];
197 | try {
198 | params[partitionKeyName] = convertUrlType(req.params[partitionKeyName], partitionKeyType);
199 | } catch(err) {
200 | res.statusCode = 500;
201 | res.json({error: 'Wrong column type ' + err});
202 | }
203 | }
204 | if (hasSortKey) {
205 | try {
206 | params[sortKeyName] = convertUrlType(req.params[sortKeyName], sortKeyType);
207 | } catch(err) {
208 | res.statusCode = 500;
209 | res.json({error: 'Wrong column type ' + err});
210 | }
211 | }
212 |
213 | let removeItemParams = {
214 | TableName: tableName,
215 | Key: params
216 | }
217 | dynamodb.delete(removeItemParams, (err, data)=> {
218 | if(err) {
219 | res.statusCode = 500;
220 | res.json({error: err, url: req.url});
221 | } else {
222 | res.json({url: req.url, data: data});
223 | }
224 | });
225 | });
226 | app.listen(3000, function() {
227 | console.log("App started")
228 | });
229 |
230 | // Export the app object. When executing the application local this does nothing. However,
231 | // to port it to AWS Lambda we will create a wrapper around that will load the app from
232 | // this file
233 | module.exports = app
234 |
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/src/event.json:
--------------------------------------------------------------------------------
1 | {
2 | "key1": "value1",
3 | "key2": "value2",
4 | "key3": "value3"
5 | }
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/src/index.js:
--------------------------------------------------------------------------------
1 | const awsServerlessExpress = require('aws-serverless-express');
2 | const app = require('./app');
3 |
4 | const server = awsServerlessExpress.createServer(app);
5 |
6 | exports.handler = (event, context) => {
7 | console.log(`EVENT: ${JSON.stringify(event)}`);
8 | awsServerlessExpress.proxy(server, event, context);
9 | };
10 |
--------------------------------------------------------------------------------
/amplify/backend/function/booksearchrest/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "booksearchrest",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "dependencies": {
7 | "aws-sdk": "^2.580.0",
8 | "aws-serverless-express": "^3.3.5",
9 | "body-parser": "^1.17.1",
10 | "express": "^4.15.2"
11 | },
12 | "devDependencies": {},
13 | "scripts": {
14 | "test": "echo \"Error: no test specified\" && exit 1"
15 | },
16 | "author": "",
17 | "license": "ISC"
18 | }
19 |
--------------------------------------------------------------------------------
/amplify/backend/storage/booksearchrest/booksearchrest-cloudformation-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "AWSTemplateFormatVersion": "2010-09-09",
3 | "Description": "DynamoDB resource stack creation using Amplify CLI",
4 | "Parameters": {
5 | "partitionKeyName": {
6 | "Type": "String"
7 | },
8 | "partitionKeyType": {
9 | "Type": "String"
10 | },
11 | "env": {
12 | "Type": "String"
13 | },
14 |
15 | "sortKeyName": {
16 | "Type": "String"
17 | },
18 | "sortKeyType": {
19 | "Type": "String"
20 | },
21 |
22 | "tableName": {
23 | "Type": "String"
24 | }
25 | },
26 | "Conditions": {
27 | "ShouldNotCreateEnvResources": {
28 | "Fn::Equals": [
29 | {
30 | "Ref": "env"
31 | },
32 | "NONE"
33 | ]
34 | }
35 | },
36 | "Resources": {
37 | "DynamoDBTable": {
38 | "Type": "AWS::DynamoDB::Table",
39 | "Properties": {
40 | "AttributeDefinitions": [
41 |
42 | {
43 | "AttributeName": "author",
44 | "AttributeType": "S"
45 | } ,
46 |
47 | {
48 | "AttributeName": "releaseDate",
49 | "AttributeType": "S"
50 | }
51 |
52 | ],
53 | "KeySchema": [
54 |
55 | {
56 | "AttributeName": "author",
57 | "KeyType": "HASH"
58 | } ,
59 |
60 | {
61 | "AttributeName": "releaseDate",
62 | "KeyType": "RANGE"
63 | }
64 |
65 | ],
66 | "ProvisionedThroughput": {
67 | "ReadCapacityUnits": "5",
68 | "WriteCapacityUnits": "5"
69 | },
70 | "StreamSpecification": {
71 | "StreamViewType": "NEW_IMAGE"
72 | },
73 | "TableName": {
74 | "Fn::If": [
75 | "ShouldNotCreateEnvResources",
76 | {
77 | "Ref": "tableName"
78 | },
79 | {
80 |
81 | "Fn::Join": [
82 | "",
83 | [
84 | {
85 | "Ref": "tableName"
86 | },
87 | "-",
88 | {
89 | "Ref": "env"
90 | }
91 | ]
92 | ]
93 | }
94 | ]
95 | }
96 |
97 | }
98 | }
99 | },
100 | "Outputs": {
101 | "Name": {
102 | "Value": {
103 | "Ref": "DynamoDBTable"
104 | }
105 | },
106 | "Arn": {
107 | "Value": {
108 | "Fn::GetAtt": [
109 | "DynamoDBTable",
110 | "Arn"
111 | ]
112 | }
113 | },
114 | "StreamArn": {
115 | "Value": {
116 | "Fn::GetAtt": [
117 | "DynamoDBTable",
118 | "StreamArn"
119 | ]
120 | }
121 | },
122 | "PartitionKeyName": {
123 | "Value": {
124 | "Ref": "partitionKeyName"
125 | }
126 | },
127 | "PartitionKeyType": {
128 | "Value": {
129 | "Ref": "partitionKeyType"
130 | }
131 | },
132 |
133 | "SortKeyName": {
134 | "Value": {
135 | "Ref": "sortKeyName"
136 | }
137 | },
138 | "SortKeyType": {
139 | "Value": {
140 | "Ref": "sortKeyType"
141 | }
142 | },
143 |
144 | "Region": {
145 | "Value": {
146 | "Ref": "AWS::Region"
147 | }
148 | }
149 | }
150 | }
--------------------------------------------------------------------------------
/amplify/backend/storage/booksearchrest/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "tableName": "booksearchrest",
3 | "partitionKeyName": "author",
4 | "partitionKeyType": "S",
5 | "sortKeyName": "releaseDate",
6 | "sortKeyType": "S"
7 | }
--------------------------------------------------------------------------------
/amplify/backend/storage/booksearchrest/storage-params.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/amplify/team-provider-info.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: '@vue/cli-plugin-unit-jest',
3 | setupFiles: ['./tests/unit/setup.js']
4 | };
5 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "amplify-vue-search-example",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "test:unit": "vue-cli-service test:unit",
9 | "lint": "vue-cli-service lint"
10 | },
11 | "dependencies": {
12 | "aws-amplify": "^3.0.10",
13 | "aws-amplify-vue": "^2.1.1",
14 | "core-js": "^3.6.4",
15 | "vue": "^2.6.11",
16 | "vue-router": "^3.1.6",
17 | "vuetify": "^2.2.11"
18 | },
19 | "devDependencies": {
20 | "@vue/cli-plugin-babel": "~4.3.0",
21 | "@vue/cli-plugin-eslint": "~4.3.0",
22 | "@vue/cli-plugin-router": "~4.3.0",
23 | "@vue/cli-plugin-unit-jest": "~4.3.0",
24 | "@vue/cli-service": "~4.3.0",
25 | "@vue/test-utils": "1.0.0-beta.31",
26 | "babel-eslint": "^10.1.0",
27 | "eslint": "^6.7.2",
28 | "eslint-plugin-vue": "^6.2.2",
29 | "sass": "^1.19.0",
30 | "sass-loader": "^8.0.0",
31 | "vue-cli-plugin-vuetify": "~2.0.5",
32 | "vue-template-compiler": "^2.6.11",
33 | "vuetify-loader": "^1.3.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/public/assets/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amplify-vue-search-example/1ec4604c75b3e4c3e24fb1208f785a09457da8fa/public/assets/architecture.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amplify-vue-search-example/1ec4604c75b3e4c3e24fb1208f785a09457da8fa/public/favicon.ico
--------------------------------------------------------------------------------
/public/images/architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amplify-vue-search-example/1ec4604c75b3e4c3e24fb1208f785a09457da8fa/public/images/architecture.png
--------------------------------------------------------------------------------
/public/images/dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amplify-vue-search-example/1ec4604c75b3e4c3e24fb1208f785a09457da8fa/public/images/dashboard.png
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
50 |
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aws-samples/amplify-vue-search-example/1ec4604c75b3e4c3e24fb1208f785a09457da8fa/src/assets/logo.png
--------------------------------------------------------------------------------
/src/assets/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/components/GraphqlSearchForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Search Books
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
29 |
36 |
37 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Search
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/src/components/RegisterForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Register Book
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 |
37 |
38 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | description
56 | (optional)
57 |
58 |
59 |
60 |
61 |
62 |
63 | Register
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/components/RestApiSearchForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Search Books
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | Search
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/components/SearchResult.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/graphql/mutations.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const createBook = /* GraphQL */ `
5 | mutation CreateBook(
6 | $input: CreateBookInput!
7 | $condition: ModelBookConditionInput
8 | ) {
9 | createBook(input: $input, condition: $condition) {
10 | id
11 | title
12 | author
13 | price
14 | description
15 | releaseDate
16 | }
17 | }
18 | `;
19 | export const updateBook = /* GraphQL */ `
20 | mutation UpdateBook(
21 | $input: UpdateBookInput!
22 | $condition: ModelBookConditionInput
23 | ) {
24 | updateBook(input: $input, condition: $condition) {
25 | id
26 | title
27 | author
28 | price
29 | description
30 | releaseDate
31 | }
32 | }
33 | `;
34 | export const deleteBook = /* GraphQL */ `
35 | mutation DeleteBook(
36 | $input: DeleteBookInput!
37 | $condition: ModelBookConditionInput
38 | ) {
39 | deleteBook(input: $input, condition: $condition) {
40 | id
41 | title
42 | author
43 | price
44 | description
45 | releaseDate
46 | }
47 | }
48 | `;
49 |
--------------------------------------------------------------------------------
/src/graphql/queries.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const getBook = /* GraphQL */ `
5 | query GetBook($id: ID!) {
6 | getBook(id: $id) {
7 | id
8 | title
9 | author
10 | price
11 | description
12 | releaseDate
13 | }
14 | }
15 | `;
16 | export const listBooks = /* GraphQL */ `
17 | query ListBooks(
18 | $filter: ModelBookFilterInput
19 | $limit: Int
20 | $nextToken: String
21 | ) {
22 | listBooks(filter: $filter, limit: $limit, nextToken: $nextToken) {
23 | items {
24 | id
25 | title
26 | author
27 | price
28 | description
29 | releaseDate
30 | }
31 | nextToken
32 | }
33 | }
34 | `;
35 | export const searchBooks = /* GraphQL */ `
36 | query SearchBooks(
37 | $filter: SearchableBookFilterInput
38 | $sort: SearchableBookSortInput
39 | $limit: Int
40 | $nextToken: String
41 | ) {
42 | searchBooks(
43 | filter: $filter
44 | sort: $sort
45 | limit: $limit
46 | nextToken: $nextToken
47 | ) {
48 | items {
49 | id
50 | title
51 | author
52 | price
53 | description
54 | releaseDate
55 | }
56 | nextToken
57 | total
58 | }
59 | }
60 | `;
61 |
--------------------------------------------------------------------------------
/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" : "getBook",
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" : "Book",
37 | "ofType" : null
38 | },
39 | "isDeprecated" : false,
40 | "deprecationReason" : null
41 | }, {
42 | "name" : "listBooks",
43 | "description" : null,
44 | "args" : [ {
45 | "name" : "filter",
46 | "description" : null,
47 | "type" : {
48 | "kind" : "INPUT_OBJECT",
49 | "name" : "ModelBookFilterInput",
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" : "ModelBookConnection",
75 | "ofType" : null
76 | },
77 | "isDeprecated" : false,
78 | "deprecationReason" : null
79 | }, {
80 | "name" : "searchBooks",
81 | "description" : null,
82 | "args" : [ {
83 | "name" : "filter",
84 | "description" : null,
85 | "type" : {
86 | "kind" : "INPUT_OBJECT",
87 | "name" : "SearchableBookFilterInput",
88 | "ofType" : null
89 | },
90 | "defaultValue" : null
91 | }, {
92 | "name" : "sort",
93 | "description" : null,
94 | "type" : {
95 | "kind" : "INPUT_OBJECT",
96 | "name" : "SearchableBookSortInput",
97 | "ofType" : null
98 | },
99 | "defaultValue" : null
100 | }, {
101 | "name" : "limit",
102 | "description" : null,
103 | "type" : {
104 | "kind" : "SCALAR",
105 | "name" : "Int",
106 | "ofType" : null
107 | },
108 | "defaultValue" : null
109 | }, {
110 | "name" : "nextToken",
111 | "description" : null,
112 | "type" : {
113 | "kind" : "SCALAR",
114 | "name" : "String",
115 | "ofType" : null
116 | },
117 | "defaultValue" : null
118 | } ],
119 | "type" : {
120 | "kind" : "OBJECT",
121 | "name" : "SearchableBookConnection",
122 | "ofType" : null
123 | },
124 | "isDeprecated" : false,
125 | "deprecationReason" : null
126 | } ],
127 | "inputFields" : null,
128 | "interfaces" : [ ],
129 | "enumValues" : null,
130 | "possibleTypes" : null
131 | }, {
132 | "kind" : "OBJECT",
133 | "name" : "Book",
134 | "description" : null,
135 | "fields" : [ {
136 | "name" : "id",
137 | "description" : null,
138 | "args" : [ ],
139 | "type" : {
140 | "kind" : "NON_NULL",
141 | "name" : null,
142 | "ofType" : {
143 | "kind" : "SCALAR",
144 | "name" : "ID",
145 | "ofType" : null
146 | }
147 | },
148 | "isDeprecated" : false,
149 | "deprecationReason" : null
150 | }, {
151 | "name" : "title",
152 | "description" : null,
153 | "args" : [ ],
154 | "type" : {
155 | "kind" : "NON_NULL",
156 | "name" : null,
157 | "ofType" : {
158 | "kind" : "SCALAR",
159 | "name" : "String",
160 | "ofType" : null
161 | }
162 | },
163 | "isDeprecated" : false,
164 | "deprecationReason" : null
165 | }, {
166 | "name" : "author",
167 | "description" : null,
168 | "args" : [ ],
169 | "type" : {
170 | "kind" : "NON_NULL",
171 | "name" : null,
172 | "ofType" : {
173 | "kind" : "SCALAR",
174 | "name" : "String",
175 | "ofType" : null
176 | }
177 | },
178 | "isDeprecated" : false,
179 | "deprecationReason" : null
180 | }, {
181 | "name" : "price",
182 | "description" : null,
183 | "args" : [ ],
184 | "type" : {
185 | "kind" : "NON_NULL",
186 | "name" : null,
187 | "ofType" : {
188 | "kind" : "SCALAR",
189 | "name" : "Int",
190 | "ofType" : null
191 | }
192 | },
193 | "isDeprecated" : false,
194 | "deprecationReason" : null
195 | }, {
196 | "name" : "description",
197 | "description" : null,
198 | "args" : [ ],
199 | "type" : {
200 | "kind" : "SCALAR",
201 | "name" : "String",
202 | "ofType" : null
203 | },
204 | "isDeprecated" : false,
205 | "deprecationReason" : null
206 | }, {
207 | "name" : "releaseDate",
208 | "description" : null,
209 | "args" : [ ],
210 | "type" : {
211 | "kind" : "SCALAR",
212 | "name" : "AWSDate",
213 | "ofType" : null
214 | },
215 | "isDeprecated" : false,
216 | "deprecationReason" : null
217 | } ],
218 | "inputFields" : null,
219 | "interfaces" : [ ],
220 | "enumValues" : null,
221 | "possibleTypes" : null
222 | }, {
223 | "kind" : "SCALAR",
224 | "name" : "ID",
225 | "description" : "Built-in ID",
226 | "fields" : null,
227 | "inputFields" : null,
228 | "interfaces" : null,
229 | "enumValues" : null,
230 | "possibleTypes" : null
231 | }, {
232 | "kind" : "SCALAR",
233 | "name" : "String",
234 | "description" : "Built-in String",
235 | "fields" : null,
236 | "inputFields" : null,
237 | "interfaces" : null,
238 | "enumValues" : null,
239 | "possibleTypes" : null
240 | }, {
241 | "kind" : "SCALAR",
242 | "name" : "Int",
243 | "description" : "Built-in Int",
244 | "fields" : null,
245 | "inputFields" : null,
246 | "interfaces" : null,
247 | "enumValues" : null,
248 | "possibleTypes" : null
249 | }, {
250 | "kind" : "SCALAR",
251 | "name" : "AWSDate",
252 | "description" : "The `AWSDate` scalar type provided by AWS AppSync, represents a valid ***extended*** [ISO 8601 Date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) string. In other words, this scalar type accepts date strings of the form `YYYY-MM-DD`. The scalar can also accept \"negative years\" of the form `-YYYY` which correspond to years before `0000`. For example, \"**-2017-05-01**\" and \"**-9999-01-01**\" are both valid dates. This scalar type can also accept an optional [time zone offset](https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators). For example, \"**1970-01-01**\", \"**1970-01-01Z**\", \"**1970-01-01-07:00**\" and \"**1970-01-01+05:30**\" are all valid dates. The time zone offset must either be `Z` (representing the UTC time zone) or be in the format `±hh:mm:ss`. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard.",
253 | "fields" : null,
254 | "inputFields" : null,
255 | "interfaces" : null,
256 | "enumValues" : null,
257 | "possibleTypes" : null
258 | }, {
259 | "kind" : "OBJECT",
260 | "name" : "ModelBookConnection",
261 | "description" : null,
262 | "fields" : [ {
263 | "name" : "items",
264 | "description" : null,
265 | "args" : [ ],
266 | "type" : {
267 | "kind" : "LIST",
268 | "name" : null,
269 | "ofType" : {
270 | "kind" : "OBJECT",
271 | "name" : "Book",
272 | "ofType" : null
273 | }
274 | },
275 | "isDeprecated" : false,
276 | "deprecationReason" : null
277 | }, {
278 | "name" : "nextToken",
279 | "description" : null,
280 | "args" : [ ],
281 | "type" : {
282 | "kind" : "SCALAR",
283 | "name" : "String",
284 | "ofType" : null
285 | },
286 | "isDeprecated" : false,
287 | "deprecationReason" : null
288 | } ],
289 | "inputFields" : null,
290 | "interfaces" : [ ],
291 | "enumValues" : null,
292 | "possibleTypes" : null
293 | }, {
294 | "kind" : "INPUT_OBJECT",
295 | "name" : "ModelBookFilterInput",
296 | "description" : null,
297 | "fields" : null,
298 | "inputFields" : [ {
299 | "name" : "id",
300 | "description" : null,
301 | "type" : {
302 | "kind" : "INPUT_OBJECT",
303 | "name" : "ModelIDInput",
304 | "ofType" : null
305 | },
306 | "defaultValue" : null
307 | }, {
308 | "name" : "title",
309 | "description" : null,
310 | "type" : {
311 | "kind" : "INPUT_OBJECT",
312 | "name" : "ModelStringInput",
313 | "ofType" : null
314 | },
315 | "defaultValue" : null
316 | }, {
317 | "name" : "author",
318 | "description" : null,
319 | "type" : {
320 | "kind" : "INPUT_OBJECT",
321 | "name" : "ModelStringInput",
322 | "ofType" : null
323 | },
324 | "defaultValue" : null
325 | }, {
326 | "name" : "price",
327 | "description" : null,
328 | "type" : {
329 | "kind" : "INPUT_OBJECT",
330 | "name" : "ModelIntInput",
331 | "ofType" : null
332 | },
333 | "defaultValue" : null
334 | }, {
335 | "name" : "description",
336 | "description" : null,
337 | "type" : {
338 | "kind" : "INPUT_OBJECT",
339 | "name" : "ModelStringInput",
340 | "ofType" : null
341 | },
342 | "defaultValue" : null
343 | }, {
344 | "name" : "releaseDate",
345 | "description" : null,
346 | "type" : {
347 | "kind" : "INPUT_OBJECT",
348 | "name" : "ModelStringInput",
349 | "ofType" : null
350 | },
351 | "defaultValue" : null
352 | }, {
353 | "name" : "and",
354 | "description" : null,
355 | "type" : {
356 | "kind" : "LIST",
357 | "name" : null,
358 | "ofType" : {
359 | "kind" : "INPUT_OBJECT",
360 | "name" : "ModelBookFilterInput",
361 | "ofType" : null
362 | }
363 | },
364 | "defaultValue" : null
365 | }, {
366 | "name" : "or",
367 | "description" : null,
368 | "type" : {
369 | "kind" : "LIST",
370 | "name" : null,
371 | "ofType" : {
372 | "kind" : "INPUT_OBJECT",
373 | "name" : "ModelBookFilterInput",
374 | "ofType" : null
375 | }
376 | },
377 | "defaultValue" : null
378 | }, {
379 | "name" : "not",
380 | "description" : null,
381 | "type" : {
382 | "kind" : "INPUT_OBJECT",
383 | "name" : "ModelBookFilterInput",
384 | "ofType" : null
385 | },
386 | "defaultValue" : null
387 | } ],
388 | "interfaces" : null,
389 | "enumValues" : null,
390 | "possibleTypes" : null
391 | }, {
392 | "kind" : "INPUT_OBJECT",
393 | "name" : "ModelIDInput",
394 | "description" : null,
395 | "fields" : null,
396 | "inputFields" : [ {
397 | "name" : "ne",
398 | "description" : null,
399 | "type" : {
400 | "kind" : "SCALAR",
401 | "name" : "ID",
402 | "ofType" : null
403 | },
404 | "defaultValue" : null
405 | }, {
406 | "name" : "eq",
407 | "description" : null,
408 | "type" : {
409 | "kind" : "SCALAR",
410 | "name" : "ID",
411 | "ofType" : null
412 | },
413 | "defaultValue" : null
414 | }, {
415 | "name" : "le",
416 | "description" : null,
417 | "type" : {
418 | "kind" : "SCALAR",
419 | "name" : "ID",
420 | "ofType" : null
421 | },
422 | "defaultValue" : null
423 | }, {
424 | "name" : "lt",
425 | "description" : null,
426 | "type" : {
427 | "kind" : "SCALAR",
428 | "name" : "ID",
429 | "ofType" : null
430 | },
431 | "defaultValue" : null
432 | }, {
433 | "name" : "ge",
434 | "description" : null,
435 | "type" : {
436 | "kind" : "SCALAR",
437 | "name" : "ID",
438 | "ofType" : null
439 | },
440 | "defaultValue" : null
441 | }, {
442 | "name" : "gt",
443 | "description" : null,
444 | "type" : {
445 | "kind" : "SCALAR",
446 | "name" : "ID",
447 | "ofType" : null
448 | },
449 | "defaultValue" : null
450 | }, {
451 | "name" : "contains",
452 | "description" : null,
453 | "type" : {
454 | "kind" : "SCALAR",
455 | "name" : "ID",
456 | "ofType" : null
457 | },
458 | "defaultValue" : null
459 | }, {
460 | "name" : "notContains",
461 | "description" : null,
462 | "type" : {
463 | "kind" : "SCALAR",
464 | "name" : "ID",
465 | "ofType" : null
466 | },
467 | "defaultValue" : null
468 | }, {
469 | "name" : "between",
470 | "description" : null,
471 | "type" : {
472 | "kind" : "LIST",
473 | "name" : null,
474 | "ofType" : {
475 | "kind" : "SCALAR",
476 | "name" : "ID",
477 | "ofType" : null
478 | }
479 | },
480 | "defaultValue" : null
481 | }, {
482 | "name" : "beginsWith",
483 | "description" : null,
484 | "type" : {
485 | "kind" : "SCALAR",
486 | "name" : "ID",
487 | "ofType" : null
488 | },
489 | "defaultValue" : null
490 | }, {
491 | "name" : "attributeExists",
492 | "description" : null,
493 | "type" : {
494 | "kind" : "SCALAR",
495 | "name" : "Boolean",
496 | "ofType" : null
497 | },
498 | "defaultValue" : null
499 | }, {
500 | "name" : "attributeType",
501 | "description" : null,
502 | "type" : {
503 | "kind" : "ENUM",
504 | "name" : "ModelAttributeTypes",
505 | "ofType" : null
506 | },
507 | "defaultValue" : null
508 | }, {
509 | "name" : "size",
510 | "description" : null,
511 | "type" : {
512 | "kind" : "INPUT_OBJECT",
513 | "name" : "ModelSizeInput",
514 | "ofType" : null
515 | },
516 | "defaultValue" : null
517 | } ],
518 | "interfaces" : null,
519 | "enumValues" : null,
520 | "possibleTypes" : null
521 | }, {
522 | "kind" : "SCALAR",
523 | "name" : "Boolean",
524 | "description" : "Built-in Boolean",
525 | "fields" : null,
526 | "inputFields" : null,
527 | "interfaces" : null,
528 | "enumValues" : null,
529 | "possibleTypes" : null
530 | }, {
531 | "kind" : "ENUM",
532 | "name" : "ModelAttributeTypes",
533 | "description" : null,
534 | "fields" : null,
535 | "inputFields" : null,
536 | "interfaces" : null,
537 | "enumValues" : [ {
538 | "name" : "binary",
539 | "description" : null,
540 | "isDeprecated" : false,
541 | "deprecationReason" : null
542 | }, {
543 | "name" : "binarySet",
544 | "description" : null,
545 | "isDeprecated" : false,
546 | "deprecationReason" : null
547 | }, {
548 | "name" : "bool",
549 | "description" : null,
550 | "isDeprecated" : false,
551 | "deprecationReason" : null
552 | }, {
553 | "name" : "list",
554 | "description" : null,
555 | "isDeprecated" : false,
556 | "deprecationReason" : null
557 | }, {
558 | "name" : "map",
559 | "description" : null,
560 | "isDeprecated" : false,
561 | "deprecationReason" : null
562 | }, {
563 | "name" : "number",
564 | "description" : null,
565 | "isDeprecated" : false,
566 | "deprecationReason" : null
567 | }, {
568 | "name" : "numberSet",
569 | "description" : null,
570 | "isDeprecated" : false,
571 | "deprecationReason" : null
572 | }, {
573 | "name" : "string",
574 | "description" : null,
575 | "isDeprecated" : false,
576 | "deprecationReason" : null
577 | }, {
578 | "name" : "stringSet",
579 | "description" : null,
580 | "isDeprecated" : false,
581 | "deprecationReason" : null
582 | }, {
583 | "name" : "_null",
584 | "description" : null,
585 | "isDeprecated" : false,
586 | "deprecationReason" : null
587 | } ],
588 | "possibleTypes" : null
589 | }, {
590 | "kind" : "INPUT_OBJECT",
591 | "name" : "ModelSizeInput",
592 | "description" : null,
593 | "fields" : null,
594 | "inputFields" : [ {
595 | "name" : "ne",
596 | "description" : null,
597 | "type" : {
598 | "kind" : "SCALAR",
599 | "name" : "Int",
600 | "ofType" : null
601 | },
602 | "defaultValue" : null
603 | }, {
604 | "name" : "eq",
605 | "description" : null,
606 | "type" : {
607 | "kind" : "SCALAR",
608 | "name" : "Int",
609 | "ofType" : null
610 | },
611 | "defaultValue" : null
612 | }, {
613 | "name" : "le",
614 | "description" : null,
615 | "type" : {
616 | "kind" : "SCALAR",
617 | "name" : "Int",
618 | "ofType" : null
619 | },
620 | "defaultValue" : null
621 | }, {
622 | "name" : "lt",
623 | "description" : null,
624 | "type" : {
625 | "kind" : "SCALAR",
626 | "name" : "Int",
627 | "ofType" : null
628 | },
629 | "defaultValue" : null
630 | }, {
631 | "name" : "ge",
632 | "description" : null,
633 | "type" : {
634 | "kind" : "SCALAR",
635 | "name" : "Int",
636 | "ofType" : null
637 | },
638 | "defaultValue" : null
639 | }, {
640 | "name" : "gt",
641 | "description" : null,
642 | "type" : {
643 | "kind" : "SCALAR",
644 | "name" : "Int",
645 | "ofType" : null
646 | },
647 | "defaultValue" : null
648 | }, {
649 | "name" : "between",
650 | "description" : null,
651 | "type" : {
652 | "kind" : "LIST",
653 | "name" : null,
654 | "ofType" : {
655 | "kind" : "SCALAR",
656 | "name" : "Int",
657 | "ofType" : null
658 | }
659 | },
660 | "defaultValue" : null
661 | } ],
662 | "interfaces" : null,
663 | "enumValues" : null,
664 | "possibleTypes" : null
665 | }, {
666 | "kind" : "INPUT_OBJECT",
667 | "name" : "ModelStringInput",
668 | "description" : null,
669 | "fields" : null,
670 | "inputFields" : [ {
671 | "name" : "ne",
672 | "description" : null,
673 | "type" : {
674 | "kind" : "SCALAR",
675 | "name" : "String",
676 | "ofType" : null
677 | },
678 | "defaultValue" : null
679 | }, {
680 | "name" : "eq",
681 | "description" : null,
682 | "type" : {
683 | "kind" : "SCALAR",
684 | "name" : "String",
685 | "ofType" : null
686 | },
687 | "defaultValue" : null
688 | }, {
689 | "name" : "le",
690 | "description" : null,
691 | "type" : {
692 | "kind" : "SCALAR",
693 | "name" : "String",
694 | "ofType" : null
695 | },
696 | "defaultValue" : null
697 | }, {
698 | "name" : "lt",
699 | "description" : null,
700 | "type" : {
701 | "kind" : "SCALAR",
702 | "name" : "String",
703 | "ofType" : null
704 | },
705 | "defaultValue" : null
706 | }, {
707 | "name" : "ge",
708 | "description" : null,
709 | "type" : {
710 | "kind" : "SCALAR",
711 | "name" : "String",
712 | "ofType" : null
713 | },
714 | "defaultValue" : null
715 | }, {
716 | "name" : "gt",
717 | "description" : null,
718 | "type" : {
719 | "kind" : "SCALAR",
720 | "name" : "String",
721 | "ofType" : null
722 | },
723 | "defaultValue" : null
724 | }, {
725 | "name" : "contains",
726 | "description" : null,
727 | "type" : {
728 | "kind" : "SCALAR",
729 | "name" : "String",
730 | "ofType" : null
731 | },
732 | "defaultValue" : null
733 | }, {
734 | "name" : "notContains",
735 | "description" : null,
736 | "type" : {
737 | "kind" : "SCALAR",
738 | "name" : "String",
739 | "ofType" : null
740 | },
741 | "defaultValue" : null
742 | }, {
743 | "name" : "between",
744 | "description" : null,
745 | "type" : {
746 | "kind" : "LIST",
747 | "name" : null,
748 | "ofType" : {
749 | "kind" : "SCALAR",
750 | "name" : "String",
751 | "ofType" : null
752 | }
753 | },
754 | "defaultValue" : null
755 | }, {
756 | "name" : "beginsWith",
757 | "description" : null,
758 | "type" : {
759 | "kind" : "SCALAR",
760 | "name" : "String",
761 | "ofType" : null
762 | },
763 | "defaultValue" : null
764 | }, {
765 | "name" : "attributeExists",
766 | "description" : null,
767 | "type" : {
768 | "kind" : "SCALAR",
769 | "name" : "Boolean",
770 | "ofType" : null
771 | },
772 | "defaultValue" : null
773 | }, {
774 | "name" : "attributeType",
775 | "description" : null,
776 | "type" : {
777 | "kind" : "ENUM",
778 | "name" : "ModelAttributeTypes",
779 | "ofType" : null
780 | },
781 | "defaultValue" : null
782 | }, {
783 | "name" : "size",
784 | "description" : null,
785 | "type" : {
786 | "kind" : "INPUT_OBJECT",
787 | "name" : "ModelSizeInput",
788 | "ofType" : null
789 | },
790 | "defaultValue" : null
791 | } ],
792 | "interfaces" : null,
793 | "enumValues" : null,
794 | "possibleTypes" : null
795 | }, {
796 | "kind" : "INPUT_OBJECT",
797 | "name" : "ModelIntInput",
798 | "description" : null,
799 | "fields" : null,
800 | "inputFields" : [ {
801 | "name" : "ne",
802 | "description" : null,
803 | "type" : {
804 | "kind" : "SCALAR",
805 | "name" : "Int",
806 | "ofType" : null
807 | },
808 | "defaultValue" : null
809 | }, {
810 | "name" : "eq",
811 | "description" : null,
812 | "type" : {
813 | "kind" : "SCALAR",
814 | "name" : "Int",
815 | "ofType" : null
816 | },
817 | "defaultValue" : null
818 | }, {
819 | "name" : "le",
820 | "description" : null,
821 | "type" : {
822 | "kind" : "SCALAR",
823 | "name" : "Int",
824 | "ofType" : null
825 | },
826 | "defaultValue" : null
827 | }, {
828 | "name" : "lt",
829 | "description" : null,
830 | "type" : {
831 | "kind" : "SCALAR",
832 | "name" : "Int",
833 | "ofType" : null
834 | },
835 | "defaultValue" : null
836 | }, {
837 | "name" : "ge",
838 | "description" : null,
839 | "type" : {
840 | "kind" : "SCALAR",
841 | "name" : "Int",
842 | "ofType" : null
843 | },
844 | "defaultValue" : null
845 | }, {
846 | "name" : "gt",
847 | "description" : null,
848 | "type" : {
849 | "kind" : "SCALAR",
850 | "name" : "Int",
851 | "ofType" : null
852 | },
853 | "defaultValue" : null
854 | }, {
855 | "name" : "between",
856 | "description" : null,
857 | "type" : {
858 | "kind" : "LIST",
859 | "name" : null,
860 | "ofType" : {
861 | "kind" : "SCALAR",
862 | "name" : "Int",
863 | "ofType" : null
864 | }
865 | },
866 | "defaultValue" : null
867 | }, {
868 | "name" : "attributeExists",
869 | "description" : null,
870 | "type" : {
871 | "kind" : "SCALAR",
872 | "name" : "Boolean",
873 | "ofType" : null
874 | },
875 | "defaultValue" : null
876 | }, {
877 | "name" : "attributeType",
878 | "description" : null,
879 | "type" : {
880 | "kind" : "ENUM",
881 | "name" : "ModelAttributeTypes",
882 | "ofType" : null
883 | },
884 | "defaultValue" : null
885 | } ],
886 | "interfaces" : null,
887 | "enumValues" : null,
888 | "possibleTypes" : null
889 | }, {
890 | "kind" : "OBJECT",
891 | "name" : "SearchableBookConnection",
892 | "description" : null,
893 | "fields" : [ {
894 | "name" : "items",
895 | "description" : null,
896 | "args" : [ ],
897 | "type" : {
898 | "kind" : "LIST",
899 | "name" : null,
900 | "ofType" : {
901 | "kind" : "OBJECT",
902 | "name" : "Book",
903 | "ofType" : null
904 | }
905 | },
906 | "isDeprecated" : false,
907 | "deprecationReason" : null
908 | }, {
909 | "name" : "nextToken",
910 | "description" : null,
911 | "args" : [ ],
912 | "type" : {
913 | "kind" : "SCALAR",
914 | "name" : "String",
915 | "ofType" : null
916 | },
917 | "isDeprecated" : false,
918 | "deprecationReason" : null
919 | }, {
920 | "name" : "total",
921 | "description" : null,
922 | "args" : [ ],
923 | "type" : {
924 | "kind" : "SCALAR",
925 | "name" : "Int",
926 | "ofType" : null
927 | },
928 | "isDeprecated" : false,
929 | "deprecationReason" : null
930 | } ],
931 | "inputFields" : null,
932 | "interfaces" : [ ],
933 | "enumValues" : null,
934 | "possibleTypes" : null
935 | }, {
936 | "kind" : "INPUT_OBJECT",
937 | "name" : "SearchableBookFilterInput",
938 | "description" : null,
939 | "fields" : null,
940 | "inputFields" : [ {
941 | "name" : "id",
942 | "description" : null,
943 | "type" : {
944 | "kind" : "INPUT_OBJECT",
945 | "name" : "SearchableIDFilterInput",
946 | "ofType" : null
947 | },
948 | "defaultValue" : null
949 | }, {
950 | "name" : "title",
951 | "description" : null,
952 | "type" : {
953 | "kind" : "INPUT_OBJECT",
954 | "name" : "SearchableStringFilterInput",
955 | "ofType" : null
956 | },
957 | "defaultValue" : null
958 | }, {
959 | "name" : "author",
960 | "description" : null,
961 | "type" : {
962 | "kind" : "INPUT_OBJECT",
963 | "name" : "SearchableStringFilterInput",
964 | "ofType" : null
965 | },
966 | "defaultValue" : null
967 | }, {
968 | "name" : "price",
969 | "description" : null,
970 | "type" : {
971 | "kind" : "INPUT_OBJECT",
972 | "name" : "SearchableIntFilterInput",
973 | "ofType" : null
974 | },
975 | "defaultValue" : null
976 | }, {
977 | "name" : "description",
978 | "description" : null,
979 | "type" : {
980 | "kind" : "INPUT_OBJECT",
981 | "name" : "SearchableStringFilterInput",
982 | "ofType" : null
983 | },
984 | "defaultValue" : null
985 | }, {
986 | "name" : "releaseDate",
987 | "description" : null,
988 | "type" : {
989 | "kind" : "INPUT_OBJECT",
990 | "name" : "SearchableStringFilterInput",
991 | "ofType" : null
992 | },
993 | "defaultValue" : null
994 | }, {
995 | "name" : "and",
996 | "description" : null,
997 | "type" : {
998 | "kind" : "LIST",
999 | "name" : null,
1000 | "ofType" : {
1001 | "kind" : "INPUT_OBJECT",
1002 | "name" : "SearchableBookFilterInput",
1003 | "ofType" : null
1004 | }
1005 | },
1006 | "defaultValue" : null
1007 | }, {
1008 | "name" : "or",
1009 | "description" : null,
1010 | "type" : {
1011 | "kind" : "LIST",
1012 | "name" : null,
1013 | "ofType" : {
1014 | "kind" : "INPUT_OBJECT",
1015 | "name" : "SearchableBookFilterInput",
1016 | "ofType" : null
1017 | }
1018 | },
1019 | "defaultValue" : null
1020 | }, {
1021 | "name" : "not",
1022 | "description" : null,
1023 | "type" : {
1024 | "kind" : "INPUT_OBJECT",
1025 | "name" : "SearchableBookFilterInput",
1026 | "ofType" : null
1027 | },
1028 | "defaultValue" : null
1029 | } ],
1030 | "interfaces" : null,
1031 | "enumValues" : null,
1032 | "possibleTypes" : null
1033 | }, {
1034 | "kind" : "INPUT_OBJECT",
1035 | "name" : "SearchableIDFilterInput",
1036 | "description" : null,
1037 | "fields" : null,
1038 | "inputFields" : [ {
1039 | "name" : "ne",
1040 | "description" : null,
1041 | "type" : {
1042 | "kind" : "SCALAR",
1043 | "name" : "ID",
1044 | "ofType" : null
1045 | },
1046 | "defaultValue" : null
1047 | }, {
1048 | "name" : "gt",
1049 | "description" : null,
1050 | "type" : {
1051 | "kind" : "SCALAR",
1052 | "name" : "ID",
1053 | "ofType" : null
1054 | },
1055 | "defaultValue" : null
1056 | }, {
1057 | "name" : "lt",
1058 | "description" : null,
1059 | "type" : {
1060 | "kind" : "SCALAR",
1061 | "name" : "ID",
1062 | "ofType" : null
1063 | },
1064 | "defaultValue" : null
1065 | }, {
1066 | "name" : "gte",
1067 | "description" : null,
1068 | "type" : {
1069 | "kind" : "SCALAR",
1070 | "name" : "ID",
1071 | "ofType" : null
1072 | },
1073 | "defaultValue" : null
1074 | }, {
1075 | "name" : "lte",
1076 | "description" : null,
1077 | "type" : {
1078 | "kind" : "SCALAR",
1079 | "name" : "ID",
1080 | "ofType" : null
1081 | },
1082 | "defaultValue" : null
1083 | }, {
1084 | "name" : "eq",
1085 | "description" : null,
1086 | "type" : {
1087 | "kind" : "SCALAR",
1088 | "name" : "ID",
1089 | "ofType" : null
1090 | },
1091 | "defaultValue" : null
1092 | }, {
1093 | "name" : "match",
1094 | "description" : null,
1095 | "type" : {
1096 | "kind" : "SCALAR",
1097 | "name" : "ID",
1098 | "ofType" : null
1099 | },
1100 | "defaultValue" : null
1101 | }, {
1102 | "name" : "matchPhrase",
1103 | "description" : null,
1104 | "type" : {
1105 | "kind" : "SCALAR",
1106 | "name" : "ID",
1107 | "ofType" : null
1108 | },
1109 | "defaultValue" : null
1110 | }, {
1111 | "name" : "matchPhrasePrefix",
1112 | "description" : null,
1113 | "type" : {
1114 | "kind" : "SCALAR",
1115 | "name" : "ID",
1116 | "ofType" : null
1117 | },
1118 | "defaultValue" : null
1119 | }, {
1120 | "name" : "multiMatch",
1121 | "description" : null,
1122 | "type" : {
1123 | "kind" : "SCALAR",
1124 | "name" : "ID",
1125 | "ofType" : null
1126 | },
1127 | "defaultValue" : null
1128 | }, {
1129 | "name" : "exists",
1130 | "description" : null,
1131 | "type" : {
1132 | "kind" : "SCALAR",
1133 | "name" : "Boolean",
1134 | "ofType" : null
1135 | },
1136 | "defaultValue" : null
1137 | }, {
1138 | "name" : "wildcard",
1139 | "description" : null,
1140 | "type" : {
1141 | "kind" : "SCALAR",
1142 | "name" : "ID",
1143 | "ofType" : null
1144 | },
1145 | "defaultValue" : null
1146 | }, {
1147 | "name" : "regexp",
1148 | "description" : null,
1149 | "type" : {
1150 | "kind" : "SCALAR",
1151 | "name" : "ID",
1152 | "ofType" : null
1153 | },
1154 | "defaultValue" : null
1155 | } ],
1156 | "interfaces" : null,
1157 | "enumValues" : null,
1158 | "possibleTypes" : null
1159 | }, {
1160 | "kind" : "INPUT_OBJECT",
1161 | "name" : "SearchableStringFilterInput",
1162 | "description" : null,
1163 | "fields" : null,
1164 | "inputFields" : [ {
1165 | "name" : "ne",
1166 | "description" : null,
1167 | "type" : {
1168 | "kind" : "SCALAR",
1169 | "name" : "String",
1170 | "ofType" : null
1171 | },
1172 | "defaultValue" : null
1173 | }, {
1174 | "name" : "gt",
1175 | "description" : null,
1176 | "type" : {
1177 | "kind" : "SCALAR",
1178 | "name" : "String",
1179 | "ofType" : null
1180 | },
1181 | "defaultValue" : null
1182 | }, {
1183 | "name" : "lt",
1184 | "description" : null,
1185 | "type" : {
1186 | "kind" : "SCALAR",
1187 | "name" : "String",
1188 | "ofType" : null
1189 | },
1190 | "defaultValue" : null
1191 | }, {
1192 | "name" : "gte",
1193 | "description" : null,
1194 | "type" : {
1195 | "kind" : "SCALAR",
1196 | "name" : "String",
1197 | "ofType" : null
1198 | },
1199 | "defaultValue" : null
1200 | }, {
1201 | "name" : "lte",
1202 | "description" : null,
1203 | "type" : {
1204 | "kind" : "SCALAR",
1205 | "name" : "String",
1206 | "ofType" : null
1207 | },
1208 | "defaultValue" : null
1209 | }, {
1210 | "name" : "eq",
1211 | "description" : null,
1212 | "type" : {
1213 | "kind" : "SCALAR",
1214 | "name" : "String",
1215 | "ofType" : null
1216 | },
1217 | "defaultValue" : null
1218 | }, {
1219 | "name" : "match",
1220 | "description" : null,
1221 | "type" : {
1222 | "kind" : "SCALAR",
1223 | "name" : "String",
1224 | "ofType" : null
1225 | },
1226 | "defaultValue" : null
1227 | }, {
1228 | "name" : "matchPhrase",
1229 | "description" : null,
1230 | "type" : {
1231 | "kind" : "SCALAR",
1232 | "name" : "String",
1233 | "ofType" : null
1234 | },
1235 | "defaultValue" : null
1236 | }, {
1237 | "name" : "matchPhrasePrefix",
1238 | "description" : null,
1239 | "type" : {
1240 | "kind" : "SCALAR",
1241 | "name" : "String",
1242 | "ofType" : null
1243 | },
1244 | "defaultValue" : null
1245 | }, {
1246 | "name" : "multiMatch",
1247 | "description" : null,
1248 | "type" : {
1249 | "kind" : "SCALAR",
1250 | "name" : "String",
1251 | "ofType" : null
1252 | },
1253 | "defaultValue" : null
1254 | }, {
1255 | "name" : "exists",
1256 | "description" : null,
1257 | "type" : {
1258 | "kind" : "SCALAR",
1259 | "name" : "Boolean",
1260 | "ofType" : null
1261 | },
1262 | "defaultValue" : null
1263 | }, {
1264 | "name" : "wildcard",
1265 | "description" : null,
1266 | "type" : {
1267 | "kind" : "SCALAR",
1268 | "name" : "String",
1269 | "ofType" : null
1270 | },
1271 | "defaultValue" : null
1272 | }, {
1273 | "name" : "regexp",
1274 | "description" : null,
1275 | "type" : {
1276 | "kind" : "SCALAR",
1277 | "name" : "String",
1278 | "ofType" : null
1279 | },
1280 | "defaultValue" : null
1281 | } ],
1282 | "interfaces" : null,
1283 | "enumValues" : null,
1284 | "possibleTypes" : null
1285 | }, {
1286 | "kind" : "INPUT_OBJECT",
1287 | "name" : "SearchableIntFilterInput",
1288 | "description" : null,
1289 | "fields" : null,
1290 | "inputFields" : [ {
1291 | "name" : "ne",
1292 | "description" : null,
1293 | "type" : {
1294 | "kind" : "SCALAR",
1295 | "name" : "Int",
1296 | "ofType" : null
1297 | },
1298 | "defaultValue" : null
1299 | }, {
1300 | "name" : "gt",
1301 | "description" : null,
1302 | "type" : {
1303 | "kind" : "SCALAR",
1304 | "name" : "Int",
1305 | "ofType" : null
1306 | },
1307 | "defaultValue" : null
1308 | }, {
1309 | "name" : "lt",
1310 | "description" : null,
1311 | "type" : {
1312 | "kind" : "SCALAR",
1313 | "name" : "Int",
1314 | "ofType" : null
1315 | },
1316 | "defaultValue" : null
1317 | }, {
1318 | "name" : "gte",
1319 | "description" : null,
1320 | "type" : {
1321 | "kind" : "SCALAR",
1322 | "name" : "Int",
1323 | "ofType" : null
1324 | },
1325 | "defaultValue" : null
1326 | }, {
1327 | "name" : "lte",
1328 | "description" : null,
1329 | "type" : {
1330 | "kind" : "SCALAR",
1331 | "name" : "Int",
1332 | "ofType" : null
1333 | },
1334 | "defaultValue" : null
1335 | }, {
1336 | "name" : "eq",
1337 | "description" : null,
1338 | "type" : {
1339 | "kind" : "SCALAR",
1340 | "name" : "Int",
1341 | "ofType" : null
1342 | },
1343 | "defaultValue" : null
1344 | }, {
1345 | "name" : "range",
1346 | "description" : null,
1347 | "type" : {
1348 | "kind" : "LIST",
1349 | "name" : null,
1350 | "ofType" : {
1351 | "kind" : "SCALAR",
1352 | "name" : "Int",
1353 | "ofType" : null
1354 | }
1355 | },
1356 | "defaultValue" : null
1357 | } ],
1358 | "interfaces" : null,
1359 | "enumValues" : null,
1360 | "possibleTypes" : null
1361 | }, {
1362 | "kind" : "INPUT_OBJECT",
1363 | "name" : "SearchableBookSortInput",
1364 | "description" : null,
1365 | "fields" : null,
1366 | "inputFields" : [ {
1367 | "name" : "field",
1368 | "description" : null,
1369 | "type" : {
1370 | "kind" : "ENUM",
1371 | "name" : "SearchableBookSortableFields",
1372 | "ofType" : null
1373 | },
1374 | "defaultValue" : null
1375 | }, {
1376 | "name" : "direction",
1377 | "description" : null,
1378 | "type" : {
1379 | "kind" : "ENUM",
1380 | "name" : "SearchableSortDirection",
1381 | "ofType" : null
1382 | },
1383 | "defaultValue" : null
1384 | } ],
1385 | "interfaces" : null,
1386 | "enumValues" : null,
1387 | "possibleTypes" : null
1388 | }, {
1389 | "kind" : "ENUM",
1390 | "name" : "SearchableBookSortableFields",
1391 | "description" : null,
1392 | "fields" : null,
1393 | "inputFields" : null,
1394 | "interfaces" : null,
1395 | "enumValues" : [ {
1396 | "name" : "id",
1397 | "description" : null,
1398 | "isDeprecated" : false,
1399 | "deprecationReason" : null
1400 | }, {
1401 | "name" : "title",
1402 | "description" : null,
1403 | "isDeprecated" : false,
1404 | "deprecationReason" : null
1405 | }, {
1406 | "name" : "author",
1407 | "description" : null,
1408 | "isDeprecated" : false,
1409 | "deprecationReason" : null
1410 | }, {
1411 | "name" : "price",
1412 | "description" : null,
1413 | "isDeprecated" : false,
1414 | "deprecationReason" : null
1415 | }, {
1416 | "name" : "description",
1417 | "description" : null,
1418 | "isDeprecated" : false,
1419 | "deprecationReason" : null
1420 | }, {
1421 | "name" : "releaseDate",
1422 | "description" : null,
1423 | "isDeprecated" : false,
1424 | "deprecationReason" : null
1425 | } ],
1426 | "possibleTypes" : null
1427 | }, {
1428 | "kind" : "ENUM",
1429 | "name" : "SearchableSortDirection",
1430 | "description" : null,
1431 | "fields" : null,
1432 | "inputFields" : null,
1433 | "interfaces" : null,
1434 | "enumValues" : [ {
1435 | "name" : "asc",
1436 | "description" : null,
1437 | "isDeprecated" : false,
1438 | "deprecationReason" : null
1439 | }, {
1440 | "name" : "desc",
1441 | "description" : null,
1442 | "isDeprecated" : false,
1443 | "deprecationReason" : null
1444 | } ],
1445 | "possibleTypes" : null
1446 | }, {
1447 | "kind" : "OBJECT",
1448 | "name" : "Mutation",
1449 | "description" : null,
1450 | "fields" : [ {
1451 | "name" : "createBook",
1452 | "description" : null,
1453 | "args" : [ {
1454 | "name" : "input",
1455 | "description" : null,
1456 | "type" : {
1457 | "kind" : "NON_NULL",
1458 | "name" : null,
1459 | "ofType" : {
1460 | "kind" : "INPUT_OBJECT",
1461 | "name" : "CreateBookInput",
1462 | "ofType" : null
1463 | }
1464 | },
1465 | "defaultValue" : null
1466 | }, {
1467 | "name" : "condition",
1468 | "description" : null,
1469 | "type" : {
1470 | "kind" : "INPUT_OBJECT",
1471 | "name" : "ModelBookConditionInput",
1472 | "ofType" : null
1473 | },
1474 | "defaultValue" : null
1475 | } ],
1476 | "type" : {
1477 | "kind" : "OBJECT",
1478 | "name" : "Book",
1479 | "ofType" : null
1480 | },
1481 | "isDeprecated" : false,
1482 | "deprecationReason" : null
1483 | }, {
1484 | "name" : "updateBook",
1485 | "description" : null,
1486 | "args" : [ {
1487 | "name" : "input",
1488 | "description" : null,
1489 | "type" : {
1490 | "kind" : "NON_NULL",
1491 | "name" : null,
1492 | "ofType" : {
1493 | "kind" : "INPUT_OBJECT",
1494 | "name" : "UpdateBookInput",
1495 | "ofType" : null
1496 | }
1497 | },
1498 | "defaultValue" : null
1499 | }, {
1500 | "name" : "condition",
1501 | "description" : null,
1502 | "type" : {
1503 | "kind" : "INPUT_OBJECT",
1504 | "name" : "ModelBookConditionInput",
1505 | "ofType" : null
1506 | },
1507 | "defaultValue" : null
1508 | } ],
1509 | "type" : {
1510 | "kind" : "OBJECT",
1511 | "name" : "Book",
1512 | "ofType" : null
1513 | },
1514 | "isDeprecated" : false,
1515 | "deprecationReason" : null
1516 | }, {
1517 | "name" : "deleteBook",
1518 | "description" : null,
1519 | "args" : [ {
1520 | "name" : "input",
1521 | "description" : null,
1522 | "type" : {
1523 | "kind" : "NON_NULL",
1524 | "name" : null,
1525 | "ofType" : {
1526 | "kind" : "INPUT_OBJECT",
1527 | "name" : "DeleteBookInput",
1528 | "ofType" : null
1529 | }
1530 | },
1531 | "defaultValue" : null
1532 | }, {
1533 | "name" : "condition",
1534 | "description" : null,
1535 | "type" : {
1536 | "kind" : "INPUT_OBJECT",
1537 | "name" : "ModelBookConditionInput",
1538 | "ofType" : null
1539 | },
1540 | "defaultValue" : null
1541 | } ],
1542 | "type" : {
1543 | "kind" : "OBJECT",
1544 | "name" : "Book",
1545 | "ofType" : null
1546 | },
1547 | "isDeprecated" : false,
1548 | "deprecationReason" : null
1549 | } ],
1550 | "inputFields" : null,
1551 | "interfaces" : [ ],
1552 | "enumValues" : null,
1553 | "possibleTypes" : null
1554 | }, {
1555 | "kind" : "INPUT_OBJECT",
1556 | "name" : "CreateBookInput",
1557 | "description" : null,
1558 | "fields" : null,
1559 | "inputFields" : [ {
1560 | "name" : "id",
1561 | "description" : null,
1562 | "type" : {
1563 | "kind" : "SCALAR",
1564 | "name" : "ID",
1565 | "ofType" : null
1566 | },
1567 | "defaultValue" : null
1568 | }, {
1569 | "name" : "title",
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" : "author",
1583 | "description" : null,
1584 | "type" : {
1585 | "kind" : "NON_NULL",
1586 | "name" : null,
1587 | "ofType" : {
1588 | "kind" : "SCALAR",
1589 | "name" : "String",
1590 | "ofType" : null
1591 | }
1592 | },
1593 | "defaultValue" : null
1594 | }, {
1595 | "name" : "price",
1596 | "description" : null,
1597 | "type" : {
1598 | "kind" : "NON_NULL",
1599 | "name" : null,
1600 | "ofType" : {
1601 | "kind" : "SCALAR",
1602 | "name" : "Int",
1603 | "ofType" : null
1604 | }
1605 | },
1606 | "defaultValue" : null
1607 | }, {
1608 | "name" : "description",
1609 | "description" : null,
1610 | "type" : {
1611 | "kind" : "SCALAR",
1612 | "name" : "String",
1613 | "ofType" : null
1614 | },
1615 | "defaultValue" : null
1616 | }, {
1617 | "name" : "releaseDate",
1618 | "description" : null,
1619 | "type" : {
1620 | "kind" : "SCALAR",
1621 | "name" : "AWSDate",
1622 | "ofType" : null
1623 | },
1624 | "defaultValue" : null
1625 | } ],
1626 | "interfaces" : null,
1627 | "enumValues" : null,
1628 | "possibleTypes" : null
1629 | }, {
1630 | "kind" : "INPUT_OBJECT",
1631 | "name" : "ModelBookConditionInput",
1632 | "description" : null,
1633 | "fields" : null,
1634 | "inputFields" : [ {
1635 | "name" : "title",
1636 | "description" : null,
1637 | "type" : {
1638 | "kind" : "INPUT_OBJECT",
1639 | "name" : "ModelStringInput",
1640 | "ofType" : null
1641 | },
1642 | "defaultValue" : null
1643 | }, {
1644 | "name" : "author",
1645 | "description" : null,
1646 | "type" : {
1647 | "kind" : "INPUT_OBJECT",
1648 | "name" : "ModelStringInput",
1649 | "ofType" : null
1650 | },
1651 | "defaultValue" : null
1652 | }, {
1653 | "name" : "price",
1654 | "description" : null,
1655 | "type" : {
1656 | "kind" : "INPUT_OBJECT",
1657 | "name" : "ModelIntInput",
1658 | "ofType" : null
1659 | },
1660 | "defaultValue" : null
1661 | }, {
1662 | "name" : "description",
1663 | "description" : null,
1664 | "type" : {
1665 | "kind" : "INPUT_OBJECT",
1666 | "name" : "ModelStringInput",
1667 | "ofType" : null
1668 | },
1669 | "defaultValue" : null
1670 | }, {
1671 | "name" : "releaseDate",
1672 | "description" : null,
1673 | "type" : {
1674 | "kind" : "INPUT_OBJECT",
1675 | "name" : "ModelStringInput",
1676 | "ofType" : null
1677 | },
1678 | "defaultValue" : null
1679 | }, {
1680 | "name" : "and",
1681 | "description" : null,
1682 | "type" : {
1683 | "kind" : "LIST",
1684 | "name" : null,
1685 | "ofType" : {
1686 | "kind" : "INPUT_OBJECT",
1687 | "name" : "ModelBookConditionInput",
1688 | "ofType" : null
1689 | }
1690 | },
1691 | "defaultValue" : null
1692 | }, {
1693 | "name" : "or",
1694 | "description" : null,
1695 | "type" : {
1696 | "kind" : "LIST",
1697 | "name" : null,
1698 | "ofType" : {
1699 | "kind" : "INPUT_OBJECT",
1700 | "name" : "ModelBookConditionInput",
1701 | "ofType" : null
1702 | }
1703 | },
1704 | "defaultValue" : null
1705 | }, {
1706 | "name" : "not",
1707 | "description" : null,
1708 | "type" : {
1709 | "kind" : "INPUT_OBJECT",
1710 | "name" : "ModelBookConditionInput",
1711 | "ofType" : null
1712 | },
1713 | "defaultValue" : null
1714 | } ],
1715 | "interfaces" : null,
1716 | "enumValues" : null,
1717 | "possibleTypes" : null
1718 | }, {
1719 | "kind" : "INPUT_OBJECT",
1720 | "name" : "UpdateBookInput",
1721 | "description" : null,
1722 | "fields" : null,
1723 | "inputFields" : [ {
1724 | "name" : "id",
1725 | "description" : null,
1726 | "type" : {
1727 | "kind" : "NON_NULL",
1728 | "name" : null,
1729 | "ofType" : {
1730 | "kind" : "SCALAR",
1731 | "name" : "ID",
1732 | "ofType" : null
1733 | }
1734 | },
1735 | "defaultValue" : null
1736 | }, {
1737 | "name" : "title",
1738 | "description" : null,
1739 | "type" : {
1740 | "kind" : "SCALAR",
1741 | "name" : "String",
1742 | "ofType" : null
1743 | },
1744 | "defaultValue" : null
1745 | }, {
1746 | "name" : "author",
1747 | "description" : null,
1748 | "type" : {
1749 | "kind" : "SCALAR",
1750 | "name" : "String",
1751 | "ofType" : null
1752 | },
1753 | "defaultValue" : null
1754 | }, {
1755 | "name" : "price",
1756 | "description" : null,
1757 | "type" : {
1758 | "kind" : "SCALAR",
1759 | "name" : "Int",
1760 | "ofType" : null
1761 | },
1762 | "defaultValue" : null
1763 | }, {
1764 | "name" : "description",
1765 | "description" : null,
1766 | "type" : {
1767 | "kind" : "SCALAR",
1768 | "name" : "String",
1769 | "ofType" : null
1770 | },
1771 | "defaultValue" : null
1772 | }, {
1773 | "name" : "releaseDate",
1774 | "description" : null,
1775 | "type" : {
1776 | "kind" : "SCALAR",
1777 | "name" : "AWSDate",
1778 | "ofType" : null
1779 | },
1780 | "defaultValue" : null
1781 | } ],
1782 | "interfaces" : null,
1783 | "enumValues" : null,
1784 | "possibleTypes" : null
1785 | }, {
1786 | "kind" : "INPUT_OBJECT",
1787 | "name" : "DeleteBookInput",
1788 | "description" : null,
1789 | "fields" : null,
1790 | "inputFields" : [ {
1791 | "name" : "id",
1792 | "description" : null,
1793 | "type" : {
1794 | "kind" : "SCALAR",
1795 | "name" : "ID",
1796 | "ofType" : null
1797 | },
1798 | "defaultValue" : null
1799 | } ],
1800 | "interfaces" : null,
1801 | "enumValues" : null,
1802 | "possibleTypes" : null
1803 | }, {
1804 | "kind" : "OBJECT",
1805 | "name" : "Subscription",
1806 | "description" : null,
1807 | "fields" : [ {
1808 | "name" : "onCreateBook",
1809 | "description" : null,
1810 | "args" : [ ],
1811 | "type" : {
1812 | "kind" : "OBJECT",
1813 | "name" : "Book",
1814 | "ofType" : null
1815 | },
1816 | "isDeprecated" : false,
1817 | "deprecationReason" : null
1818 | }, {
1819 | "name" : "onUpdateBook",
1820 | "description" : null,
1821 | "args" : [ ],
1822 | "type" : {
1823 | "kind" : "OBJECT",
1824 | "name" : "Book",
1825 | "ofType" : null
1826 | },
1827 | "isDeprecated" : false,
1828 | "deprecationReason" : null
1829 | }, {
1830 | "name" : "onDeleteBook",
1831 | "description" : null,
1832 | "args" : [ ],
1833 | "type" : {
1834 | "kind" : "OBJECT",
1835 | "name" : "Book",
1836 | "ofType" : null
1837 | },
1838 | "isDeprecated" : false,
1839 | "deprecationReason" : null
1840 | } ],
1841 | "inputFields" : null,
1842 | "interfaces" : [ ],
1843 | "enumValues" : null,
1844 | "possibleTypes" : null
1845 | }, {
1846 | "kind" : "INPUT_OBJECT",
1847 | "name" : "ModelFloatInput",
1848 | "description" : null,
1849 | "fields" : null,
1850 | "inputFields" : [ {
1851 | "name" : "ne",
1852 | "description" : null,
1853 | "type" : {
1854 | "kind" : "SCALAR",
1855 | "name" : "Float",
1856 | "ofType" : null
1857 | },
1858 | "defaultValue" : null
1859 | }, {
1860 | "name" : "eq",
1861 | "description" : null,
1862 | "type" : {
1863 | "kind" : "SCALAR",
1864 | "name" : "Float",
1865 | "ofType" : null
1866 | },
1867 | "defaultValue" : null
1868 | }, {
1869 | "name" : "le",
1870 | "description" : null,
1871 | "type" : {
1872 | "kind" : "SCALAR",
1873 | "name" : "Float",
1874 | "ofType" : null
1875 | },
1876 | "defaultValue" : null
1877 | }, {
1878 | "name" : "lt",
1879 | "description" : null,
1880 | "type" : {
1881 | "kind" : "SCALAR",
1882 | "name" : "Float",
1883 | "ofType" : null
1884 | },
1885 | "defaultValue" : null
1886 | }, {
1887 | "name" : "ge",
1888 | "description" : null,
1889 | "type" : {
1890 | "kind" : "SCALAR",
1891 | "name" : "Float",
1892 | "ofType" : null
1893 | },
1894 | "defaultValue" : null
1895 | }, {
1896 | "name" : "gt",
1897 | "description" : null,
1898 | "type" : {
1899 | "kind" : "SCALAR",
1900 | "name" : "Float",
1901 | "ofType" : null
1902 | },
1903 | "defaultValue" : null
1904 | }, {
1905 | "name" : "between",
1906 | "description" : null,
1907 | "type" : {
1908 | "kind" : "LIST",
1909 | "name" : null,
1910 | "ofType" : {
1911 | "kind" : "SCALAR",
1912 | "name" : "Float",
1913 | "ofType" : null
1914 | }
1915 | },
1916 | "defaultValue" : null
1917 | }, {
1918 | "name" : "attributeExists",
1919 | "description" : null,
1920 | "type" : {
1921 | "kind" : "SCALAR",
1922 | "name" : "Boolean",
1923 | "ofType" : null
1924 | },
1925 | "defaultValue" : null
1926 | }, {
1927 | "name" : "attributeType",
1928 | "description" : null,
1929 | "type" : {
1930 | "kind" : "ENUM",
1931 | "name" : "ModelAttributeTypes",
1932 | "ofType" : null
1933 | },
1934 | "defaultValue" : null
1935 | } ],
1936 | "interfaces" : null,
1937 | "enumValues" : null,
1938 | "possibleTypes" : null
1939 | }, {
1940 | "kind" : "SCALAR",
1941 | "name" : "Float",
1942 | "description" : "Built-in Float",
1943 | "fields" : null,
1944 | "inputFields" : null,
1945 | "interfaces" : null,
1946 | "enumValues" : null,
1947 | "possibleTypes" : null
1948 | }, {
1949 | "kind" : "ENUM",
1950 | "name" : "ModelSortDirection",
1951 | "description" : null,
1952 | "fields" : null,
1953 | "inputFields" : null,
1954 | "interfaces" : null,
1955 | "enumValues" : [ {
1956 | "name" : "ASC",
1957 | "description" : null,
1958 | "isDeprecated" : false,
1959 | "deprecationReason" : null
1960 | }, {
1961 | "name" : "DESC",
1962 | "description" : null,
1963 | "isDeprecated" : false,
1964 | "deprecationReason" : null
1965 | } ],
1966 | "possibleTypes" : null
1967 | }, {
1968 | "kind" : "INPUT_OBJECT",
1969 | "name" : "SearchableFloatFilterInput",
1970 | "description" : null,
1971 | "fields" : null,
1972 | "inputFields" : [ {
1973 | "name" : "ne",
1974 | "description" : null,
1975 | "type" : {
1976 | "kind" : "SCALAR",
1977 | "name" : "Float",
1978 | "ofType" : null
1979 | },
1980 | "defaultValue" : null
1981 | }, {
1982 | "name" : "gt",
1983 | "description" : null,
1984 | "type" : {
1985 | "kind" : "SCALAR",
1986 | "name" : "Float",
1987 | "ofType" : null
1988 | },
1989 | "defaultValue" : null
1990 | }, {
1991 | "name" : "lt",
1992 | "description" : null,
1993 | "type" : {
1994 | "kind" : "SCALAR",
1995 | "name" : "Float",
1996 | "ofType" : null
1997 | },
1998 | "defaultValue" : null
1999 | }, {
2000 | "name" : "gte",
2001 | "description" : null,
2002 | "type" : {
2003 | "kind" : "SCALAR",
2004 | "name" : "Float",
2005 | "ofType" : null
2006 | },
2007 | "defaultValue" : null
2008 | }, {
2009 | "name" : "lte",
2010 | "description" : null,
2011 | "type" : {
2012 | "kind" : "SCALAR",
2013 | "name" : "Float",
2014 | "ofType" : null
2015 | },
2016 | "defaultValue" : null
2017 | }, {
2018 | "name" : "eq",
2019 | "description" : null,
2020 | "type" : {
2021 | "kind" : "SCALAR",
2022 | "name" : "Float",
2023 | "ofType" : null
2024 | },
2025 | "defaultValue" : null
2026 | }, {
2027 | "name" : "range",
2028 | "description" : null,
2029 | "type" : {
2030 | "kind" : "LIST",
2031 | "name" : null,
2032 | "ofType" : {
2033 | "kind" : "SCALAR",
2034 | "name" : "Float",
2035 | "ofType" : null
2036 | }
2037 | },
2038 | "defaultValue" : null
2039 | } ],
2040 | "interfaces" : null,
2041 | "enumValues" : null,
2042 | "possibleTypes" : null
2043 | }, {
2044 | "kind" : "INPUT_OBJECT",
2045 | "name" : "ModelBooleanInput",
2046 | "description" : null,
2047 | "fields" : null,
2048 | "inputFields" : [ {
2049 | "name" : "ne",
2050 | "description" : null,
2051 | "type" : {
2052 | "kind" : "SCALAR",
2053 | "name" : "Boolean",
2054 | "ofType" : null
2055 | },
2056 | "defaultValue" : null
2057 | }, {
2058 | "name" : "eq",
2059 | "description" : null,
2060 | "type" : {
2061 | "kind" : "SCALAR",
2062 | "name" : "Boolean",
2063 | "ofType" : null
2064 | },
2065 | "defaultValue" : null
2066 | }, {
2067 | "name" : "attributeExists",
2068 | "description" : null,
2069 | "type" : {
2070 | "kind" : "SCALAR",
2071 | "name" : "Boolean",
2072 | "ofType" : null
2073 | },
2074 | "defaultValue" : null
2075 | }, {
2076 | "name" : "attributeType",
2077 | "description" : null,
2078 | "type" : {
2079 | "kind" : "ENUM",
2080 | "name" : "ModelAttributeTypes",
2081 | "ofType" : null
2082 | },
2083 | "defaultValue" : null
2084 | } ],
2085 | "interfaces" : null,
2086 | "enumValues" : null,
2087 | "possibleTypes" : null
2088 | }, {
2089 | "kind" : "INPUT_OBJECT",
2090 | "name" : "SearchableBooleanFilterInput",
2091 | "description" : null,
2092 | "fields" : null,
2093 | "inputFields" : [ {
2094 | "name" : "eq",
2095 | "description" : null,
2096 | "type" : {
2097 | "kind" : "SCALAR",
2098 | "name" : "Boolean",
2099 | "ofType" : null
2100 | },
2101 | "defaultValue" : null
2102 | }, {
2103 | "name" : "ne",
2104 | "description" : null,
2105 | "type" : {
2106 | "kind" : "SCALAR",
2107 | "name" : "Boolean",
2108 | "ofType" : null
2109 | },
2110 | "defaultValue" : null
2111 | } ],
2112 | "interfaces" : null,
2113 | "enumValues" : null,
2114 | "possibleTypes" : null
2115 | }, {
2116 | "kind" : "OBJECT",
2117 | "name" : "__Schema",
2118 | "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.",
2119 | "fields" : [ {
2120 | "name" : "types",
2121 | "description" : "A list of all types supported by this server.",
2122 | "args" : [ ],
2123 | "type" : {
2124 | "kind" : "NON_NULL",
2125 | "name" : null,
2126 | "ofType" : {
2127 | "kind" : "LIST",
2128 | "name" : null,
2129 | "ofType" : {
2130 | "kind" : "NON_NULL",
2131 | "name" : null,
2132 | "ofType" : {
2133 | "kind" : "OBJECT",
2134 | "name" : "__Type",
2135 | "ofType" : null
2136 | }
2137 | }
2138 | }
2139 | },
2140 | "isDeprecated" : false,
2141 | "deprecationReason" : null
2142 | }, {
2143 | "name" : "queryType",
2144 | "description" : "The type that query operations will be rooted at.",
2145 | "args" : [ ],
2146 | "type" : {
2147 | "kind" : "NON_NULL",
2148 | "name" : null,
2149 | "ofType" : {
2150 | "kind" : "OBJECT",
2151 | "name" : "__Type",
2152 | "ofType" : null
2153 | }
2154 | },
2155 | "isDeprecated" : false,
2156 | "deprecationReason" : null
2157 | }, {
2158 | "name" : "mutationType",
2159 | "description" : "If this server supports mutation, the type that mutation operations will be rooted at.",
2160 | "args" : [ ],
2161 | "type" : {
2162 | "kind" : "OBJECT",
2163 | "name" : "__Type",
2164 | "ofType" : null
2165 | },
2166 | "isDeprecated" : false,
2167 | "deprecationReason" : null
2168 | }, {
2169 | "name" : "directives",
2170 | "description" : "'A list of all directives supported by this server.",
2171 | "args" : [ ],
2172 | "type" : {
2173 | "kind" : "NON_NULL",
2174 | "name" : null,
2175 | "ofType" : {
2176 | "kind" : "LIST",
2177 | "name" : null,
2178 | "ofType" : {
2179 | "kind" : "NON_NULL",
2180 | "name" : null,
2181 | "ofType" : {
2182 | "kind" : "OBJECT",
2183 | "name" : "__Directive",
2184 | "ofType" : null
2185 | }
2186 | }
2187 | }
2188 | },
2189 | "isDeprecated" : false,
2190 | "deprecationReason" : null
2191 | }, {
2192 | "name" : "subscriptionType",
2193 | "description" : "'If this server support subscription, the type that subscription operations will be rooted at.",
2194 | "args" : [ ],
2195 | "type" : {
2196 | "kind" : "OBJECT",
2197 | "name" : "__Type",
2198 | "ofType" : null
2199 | },
2200 | "isDeprecated" : false,
2201 | "deprecationReason" : null
2202 | } ],
2203 | "inputFields" : null,
2204 | "interfaces" : [ ],
2205 | "enumValues" : null,
2206 | "possibleTypes" : null
2207 | }, {
2208 | "kind" : "OBJECT",
2209 | "name" : "__Type",
2210 | "description" : null,
2211 | "fields" : [ {
2212 | "name" : "kind",
2213 | "description" : null,
2214 | "args" : [ ],
2215 | "type" : {
2216 | "kind" : "NON_NULL",
2217 | "name" : null,
2218 | "ofType" : {
2219 | "kind" : "ENUM",
2220 | "name" : "__TypeKind",
2221 | "ofType" : null
2222 | }
2223 | },
2224 | "isDeprecated" : false,
2225 | "deprecationReason" : null
2226 | }, {
2227 | "name" : "name",
2228 | "description" : null,
2229 | "args" : [ ],
2230 | "type" : {
2231 | "kind" : "SCALAR",
2232 | "name" : "String",
2233 | "ofType" : null
2234 | },
2235 | "isDeprecated" : false,
2236 | "deprecationReason" : null
2237 | }, {
2238 | "name" : "description",
2239 | "description" : null,
2240 | "args" : [ ],
2241 | "type" : {
2242 | "kind" : "SCALAR",
2243 | "name" : "String",
2244 | "ofType" : null
2245 | },
2246 | "isDeprecated" : false,
2247 | "deprecationReason" : null
2248 | }, {
2249 | "name" : "fields",
2250 | "description" : null,
2251 | "args" : [ {
2252 | "name" : "includeDeprecated",
2253 | "description" : null,
2254 | "type" : {
2255 | "kind" : "SCALAR",
2256 | "name" : "Boolean",
2257 | "ofType" : null
2258 | },
2259 | "defaultValue" : "false"
2260 | } ],
2261 | "type" : {
2262 | "kind" : "LIST",
2263 | "name" : null,
2264 | "ofType" : {
2265 | "kind" : "NON_NULL",
2266 | "name" : null,
2267 | "ofType" : {
2268 | "kind" : "OBJECT",
2269 | "name" : "__Field",
2270 | "ofType" : null
2271 | }
2272 | }
2273 | },
2274 | "isDeprecated" : false,
2275 | "deprecationReason" : null
2276 | }, {
2277 | "name" : "interfaces",
2278 | "description" : null,
2279 | "args" : [ ],
2280 | "type" : {
2281 | "kind" : "LIST",
2282 | "name" : null,
2283 | "ofType" : {
2284 | "kind" : "NON_NULL",
2285 | "name" : null,
2286 | "ofType" : {
2287 | "kind" : "OBJECT",
2288 | "name" : "__Type",
2289 | "ofType" : null
2290 | }
2291 | }
2292 | },
2293 | "isDeprecated" : false,
2294 | "deprecationReason" : null
2295 | }, {
2296 | "name" : "possibleTypes",
2297 | "description" : null,
2298 | "args" : [ ],
2299 | "type" : {
2300 | "kind" : "LIST",
2301 | "name" : null,
2302 | "ofType" : {
2303 | "kind" : "NON_NULL",
2304 | "name" : null,
2305 | "ofType" : {
2306 | "kind" : "OBJECT",
2307 | "name" : "__Type",
2308 | "ofType" : null
2309 | }
2310 | }
2311 | },
2312 | "isDeprecated" : false,
2313 | "deprecationReason" : null
2314 | }, {
2315 | "name" : "enumValues",
2316 | "description" : null,
2317 | "args" : [ {
2318 | "name" : "includeDeprecated",
2319 | "description" : null,
2320 | "type" : {
2321 | "kind" : "SCALAR",
2322 | "name" : "Boolean",
2323 | "ofType" : null
2324 | },
2325 | "defaultValue" : "false"
2326 | } ],
2327 | "type" : {
2328 | "kind" : "LIST",
2329 | "name" : null,
2330 | "ofType" : {
2331 | "kind" : "NON_NULL",
2332 | "name" : null,
2333 | "ofType" : {
2334 | "kind" : "OBJECT",
2335 | "name" : "__EnumValue",
2336 | "ofType" : null
2337 | }
2338 | }
2339 | },
2340 | "isDeprecated" : false,
2341 | "deprecationReason" : null
2342 | }, {
2343 | "name" : "inputFields",
2344 | "description" : null,
2345 | "args" : [ ],
2346 | "type" : {
2347 | "kind" : "LIST",
2348 | "name" : null,
2349 | "ofType" : {
2350 | "kind" : "NON_NULL",
2351 | "name" : null,
2352 | "ofType" : {
2353 | "kind" : "OBJECT",
2354 | "name" : "__InputValue",
2355 | "ofType" : null
2356 | }
2357 | }
2358 | },
2359 | "isDeprecated" : false,
2360 | "deprecationReason" : null
2361 | }, {
2362 | "name" : "ofType",
2363 | "description" : null,
2364 | "args" : [ ],
2365 | "type" : {
2366 | "kind" : "OBJECT",
2367 | "name" : "__Type",
2368 | "ofType" : null
2369 | },
2370 | "isDeprecated" : false,
2371 | "deprecationReason" : null
2372 | } ],
2373 | "inputFields" : null,
2374 | "interfaces" : [ ],
2375 | "enumValues" : null,
2376 | "possibleTypes" : null
2377 | }, {
2378 | "kind" : "ENUM",
2379 | "name" : "__TypeKind",
2380 | "description" : "An enum describing what kind of type a given __Type is",
2381 | "fields" : null,
2382 | "inputFields" : null,
2383 | "interfaces" : null,
2384 | "enumValues" : [ {
2385 | "name" : "SCALAR",
2386 | "description" : "Indicates this type is a scalar.",
2387 | "isDeprecated" : false,
2388 | "deprecationReason" : null
2389 | }, {
2390 | "name" : "OBJECT",
2391 | "description" : "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
2392 | "isDeprecated" : false,
2393 | "deprecationReason" : null
2394 | }, {
2395 | "name" : "INTERFACE",
2396 | "description" : "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
2397 | "isDeprecated" : false,
2398 | "deprecationReason" : null
2399 | }, {
2400 | "name" : "UNION",
2401 | "description" : "Indicates this type is a union. `possibleTypes` is a valid field.",
2402 | "isDeprecated" : false,
2403 | "deprecationReason" : null
2404 | }, {
2405 | "name" : "ENUM",
2406 | "description" : "Indicates this type is an enum. `enumValues` is a valid field.",
2407 | "isDeprecated" : false,
2408 | "deprecationReason" : null
2409 | }, {
2410 | "name" : "INPUT_OBJECT",
2411 | "description" : "Indicates this type is an input object. `inputFields` is a valid field.",
2412 | "isDeprecated" : false,
2413 | "deprecationReason" : null
2414 | }, {
2415 | "name" : "LIST",
2416 | "description" : "Indicates this type is a list. `ofType` is a valid field.",
2417 | "isDeprecated" : false,
2418 | "deprecationReason" : null
2419 | }, {
2420 | "name" : "NON_NULL",
2421 | "description" : "Indicates this type is a non-null. `ofType` is a valid field.",
2422 | "isDeprecated" : false,
2423 | "deprecationReason" : null
2424 | } ],
2425 | "possibleTypes" : null
2426 | }, {
2427 | "kind" : "OBJECT",
2428 | "name" : "__Field",
2429 | "description" : null,
2430 | "fields" : [ {
2431 | "name" : "name",
2432 | "description" : null,
2433 | "args" : [ ],
2434 | "type" : {
2435 | "kind" : "NON_NULL",
2436 | "name" : null,
2437 | "ofType" : {
2438 | "kind" : "SCALAR",
2439 | "name" : "String",
2440 | "ofType" : null
2441 | }
2442 | },
2443 | "isDeprecated" : false,
2444 | "deprecationReason" : null
2445 | }, {
2446 | "name" : "description",
2447 | "description" : null,
2448 | "args" : [ ],
2449 | "type" : {
2450 | "kind" : "SCALAR",
2451 | "name" : "String",
2452 | "ofType" : null
2453 | },
2454 | "isDeprecated" : false,
2455 | "deprecationReason" : null
2456 | }, {
2457 | "name" : "args",
2458 | "description" : null,
2459 | "args" : [ ],
2460 | "type" : {
2461 | "kind" : "NON_NULL",
2462 | "name" : null,
2463 | "ofType" : {
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 | },
2477 | "isDeprecated" : false,
2478 | "deprecationReason" : null
2479 | }, {
2480 | "name" : "type",
2481 | "description" : null,
2482 | "args" : [ ],
2483 | "type" : {
2484 | "kind" : "NON_NULL",
2485 | "name" : null,
2486 | "ofType" : {
2487 | "kind" : "OBJECT",
2488 | "name" : "__Type",
2489 | "ofType" : null
2490 | }
2491 | },
2492 | "isDeprecated" : false,
2493 | "deprecationReason" : null
2494 | }, {
2495 | "name" : "isDeprecated",
2496 | "description" : null,
2497 | "args" : [ ],
2498 | "type" : {
2499 | "kind" : "NON_NULL",
2500 | "name" : null,
2501 | "ofType" : {
2502 | "kind" : "SCALAR",
2503 | "name" : "Boolean",
2504 | "ofType" : null
2505 | }
2506 | },
2507 | "isDeprecated" : false,
2508 | "deprecationReason" : null
2509 | }, {
2510 | "name" : "deprecationReason",
2511 | "description" : null,
2512 | "args" : [ ],
2513 | "type" : {
2514 | "kind" : "SCALAR",
2515 | "name" : "String",
2516 | "ofType" : null
2517 | },
2518 | "isDeprecated" : false,
2519 | "deprecationReason" : null
2520 | } ],
2521 | "inputFields" : null,
2522 | "interfaces" : [ ],
2523 | "enumValues" : null,
2524 | "possibleTypes" : null
2525 | }, {
2526 | "kind" : "OBJECT",
2527 | "name" : "__InputValue",
2528 | "description" : null,
2529 | "fields" : [ {
2530 | "name" : "name",
2531 | "description" : null,
2532 | "args" : [ ],
2533 | "type" : {
2534 | "kind" : "NON_NULL",
2535 | "name" : null,
2536 | "ofType" : {
2537 | "kind" : "SCALAR",
2538 | "name" : "String",
2539 | "ofType" : null
2540 | }
2541 | },
2542 | "isDeprecated" : false,
2543 | "deprecationReason" : null
2544 | }, {
2545 | "name" : "description",
2546 | "description" : null,
2547 | "args" : [ ],
2548 | "type" : {
2549 | "kind" : "SCALAR",
2550 | "name" : "String",
2551 | "ofType" : null
2552 | },
2553 | "isDeprecated" : false,
2554 | "deprecationReason" : null
2555 | }, {
2556 | "name" : "type",
2557 | "description" : null,
2558 | "args" : [ ],
2559 | "type" : {
2560 | "kind" : "NON_NULL",
2561 | "name" : null,
2562 | "ofType" : {
2563 | "kind" : "OBJECT",
2564 | "name" : "__Type",
2565 | "ofType" : null
2566 | }
2567 | },
2568 | "isDeprecated" : false,
2569 | "deprecationReason" : null
2570 | }, {
2571 | "name" : "defaultValue",
2572 | "description" : null,
2573 | "args" : [ ],
2574 | "type" : {
2575 | "kind" : "SCALAR",
2576 | "name" : "String",
2577 | "ofType" : null
2578 | },
2579 | "isDeprecated" : false,
2580 | "deprecationReason" : null
2581 | } ],
2582 | "inputFields" : null,
2583 | "interfaces" : [ ],
2584 | "enumValues" : null,
2585 | "possibleTypes" : null
2586 | }, {
2587 | "kind" : "OBJECT",
2588 | "name" : "__EnumValue",
2589 | "description" : null,
2590 | "fields" : [ {
2591 | "name" : "name",
2592 | "description" : null,
2593 | "args" : [ ],
2594 | "type" : {
2595 | "kind" : "NON_NULL",
2596 | "name" : null,
2597 | "ofType" : {
2598 | "kind" : "SCALAR",
2599 | "name" : "String",
2600 | "ofType" : null
2601 | }
2602 | },
2603 | "isDeprecated" : false,
2604 | "deprecationReason" : null
2605 | }, {
2606 | "name" : "description",
2607 | "description" : null,
2608 | "args" : [ ],
2609 | "type" : {
2610 | "kind" : "SCALAR",
2611 | "name" : "String",
2612 | "ofType" : null
2613 | },
2614 | "isDeprecated" : false,
2615 | "deprecationReason" : null
2616 | }, {
2617 | "name" : "isDeprecated",
2618 | "description" : null,
2619 | "args" : [ ],
2620 | "type" : {
2621 | "kind" : "NON_NULL",
2622 | "name" : null,
2623 | "ofType" : {
2624 | "kind" : "SCALAR",
2625 | "name" : "Boolean",
2626 | "ofType" : null
2627 | }
2628 | },
2629 | "isDeprecated" : false,
2630 | "deprecationReason" : null
2631 | }, {
2632 | "name" : "deprecationReason",
2633 | "description" : null,
2634 | "args" : [ ],
2635 | "type" : {
2636 | "kind" : "SCALAR",
2637 | "name" : "String",
2638 | "ofType" : null
2639 | },
2640 | "isDeprecated" : false,
2641 | "deprecationReason" : null
2642 | } ],
2643 | "inputFields" : null,
2644 | "interfaces" : [ ],
2645 | "enumValues" : null,
2646 | "possibleTypes" : null
2647 | }, {
2648 | "kind" : "OBJECT",
2649 | "name" : "__Directive",
2650 | "description" : null,
2651 | "fields" : [ {
2652 | "name" : "name",
2653 | "description" : null,
2654 | "args" : [ ],
2655 | "type" : {
2656 | "kind" : "SCALAR",
2657 | "name" : "String",
2658 | "ofType" : null
2659 | },
2660 | "isDeprecated" : false,
2661 | "deprecationReason" : null
2662 | }, {
2663 | "name" : "description",
2664 | "description" : null,
2665 | "args" : [ ],
2666 | "type" : {
2667 | "kind" : "SCALAR",
2668 | "name" : "String",
2669 | "ofType" : null
2670 | },
2671 | "isDeprecated" : false,
2672 | "deprecationReason" : null
2673 | }, {
2674 | "name" : "locations",
2675 | "description" : null,
2676 | "args" : [ ],
2677 | "type" : {
2678 | "kind" : "LIST",
2679 | "name" : null,
2680 | "ofType" : {
2681 | "kind" : "NON_NULL",
2682 | "name" : null,
2683 | "ofType" : {
2684 | "kind" : "ENUM",
2685 | "name" : "__DirectiveLocation",
2686 | "ofType" : null
2687 | }
2688 | }
2689 | },
2690 | "isDeprecated" : false,
2691 | "deprecationReason" : null
2692 | }, {
2693 | "name" : "args",
2694 | "description" : null,
2695 | "args" : [ ],
2696 | "type" : {
2697 | "kind" : "NON_NULL",
2698 | "name" : null,
2699 | "ofType" : {
2700 | "kind" : "LIST",
2701 | "name" : null,
2702 | "ofType" : {
2703 | "kind" : "NON_NULL",
2704 | "name" : null,
2705 | "ofType" : {
2706 | "kind" : "OBJECT",
2707 | "name" : "__InputValue",
2708 | "ofType" : null
2709 | }
2710 | }
2711 | }
2712 | },
2713 | "isDeprecated" : false,
2714 | "deprecationReason" : null
2715 | }, {
2716 | "name" : "onOperation",
2717 | "description" : null,
2718 | "args" : [ ],
2719 | "type" : {
2720 | "kind" : "SCALAR",
2721 | "name" : "Boolean",
2722 | "ofType" : null
2723 | },
2724 | "isDeprecated" : true,
2725 | "deprecationReason" : "Use `locations`."
2726 | }, {
2727 | "name" : "onFragment",
2728 | "description" : null,
2729 | "args" : [ ],
2730 | "type" : {
2731 | "kind" : "SCALAR",
2732 | "name" : "Boolean",
2733 | "ofType" : null
2734 | },
2735 | "isDeprecated" : true,
2736 | "deprecationReason" : "Use `locations`."
2737 | }, {
2738 | "name" : "onField",
2739 | "description" : null,
2740 | "args" : [ ],
2741 | "type" : {
2742 | "kind" : "SCALAR",
2743 | "name" : "Boolean",
2744 | "ofType" : null
2745 | },
2746 | "isDeprecated" : true,
2747 | "deprecationReason" : "Use `locations`."
2748 | } ],
2749 | "inputFields" : null,
2750 | "interfaces" : [ ],
2751 | "enumValues" : null,
2752 | "possibleTypes" : null
2753 | }, {
2754 | "kind" : "ENUM",
2755 | "name" : "__DirectiveLocation",
2756 | "description" : "An enum describing valid locations where a directive can be placed",
2757 | "fields" : null,
2758 | "inputFields" : null,
2759 | "interfaces" : null,
2760 | "enumValues" : [ {
2761 | "name" : "QUERY",
2762 | "description" : "Indicates the directive is valid on queries.",
2763 | "isDeprecated" : false,
2764 | "deprecationReason" : null
2765 | }, {
2766 | "name" : "MUTATION",
2767 | "description" : "Indicates the directive is valid on mutations.",
2768 | "isDeprecated" : false,
2769 | "deprecationReason" : null
2770 | }, {
2771 | "name" : "FIELD",
2772 | "description" : "Indicates the directive is valid on fields.",
2773 | "isDeprecated" : false,
2774 | "deprecationReason" : null
2775 | }, {
2776 | "name" : "FRAGMENT_DEFINITION",
2777 | "description" : "Indicates the directive is valid on fragment definitions.",
2778 | "isDeprecated" : false,
2779 | "deprecationReason" : null
2780 | }, {
2781 | "name" : "FRAGMENT_SPREAD",
2782 | "description" : "Indicates the directive is valid on fragment spreads.",
2783 | "isDeprecated" : false,
2784 | "deprecationReason" : null
2785 | }, {
2786 | "name" : "INLINE_FRAGMENT",
2787 | "description" : "Indicates the directive is valid on inline fragments.",
2788 | "isDeprecated" : false,
2789 | "deprecationReason" : null
2790 | }, {
2791 | "name" : "SCHEMA",
2792 | "description" : "Indicates the directive is valid on a schema SDL definition.",
2793 | "isDeprecated" : false,
2794 | "deprecationReason" : null
2795 | }, {
2796 | "name" : "SCALAR",
2797 | "description" : "Indicates the directive is valid on a scalar SDL definition.",
2798 | "isDeprecated" : false,
2799 | "deprecationReason" : null
2800 | }, {
2801 | "name" : "OBJECT",
2802 | "description" : "Indicates the directive is valid on an object SDL definition.",
2803 | "isDeprecated" : false,
2804 | "deprecationReason" : null
2805 | }, {
2806 | "name" : "FIELD_DEFINITION",
2807 | "description" : "Indicates the directive is valid on a field SDL definition.",
2808 | "isDeprecated" : false,
2809 | "deprecationReason" : null
2810 | }, {
2811 | "name" : "ARGUMENT_DEFINITION",
2812 | "description" : "Indicates the directive is valid on a field argument SDL definition.",
2813 | "isDeprecated" : false,
2814 | "deprecationReason" : null
2815 | }, {
2816 | "name" : "INTERFACE",
2817 | "description" : "Indicates the directive is valid on an interface SDL definition.",
2818 | "isDeprecated" : false,
2819 | "deprecationReason" : null
2820 | }, {
2821 | "name" : "UNION",
2822 | "description" : "Indicates the directive is valid on an union SDL definition.",
2823 | "isDeprecated" : false,
2824 | "deprecationReason" : null
2825 | }, {
2826 | "name" : "ENUM",
2827 | "description" : "Indicates the directive is valid on an enum SDL definition.",
2828 | "isDeprecated" : false,
2829 | "deprecationReason" : null
2830 | }, {
2831 | "name" : "ENUM_VALUE",
2832 | "description" : "Indicates the directive is valid on an enum value SDL definition.",
2833 | "isDeprecated" : false,
2834 | "deprecationReason" : null
2835 | }, {
2836 | "name" : "INPUT_OBJECT",
2837 | "description" : "Indicates the directive is valid on an input object SDL definition.",
2838 | "isDeprecated" : false,
2839 | "deprecationReason" : null
2840 | }, {
2841 | "name" : "INPUT_FIELD_DEFINITION",
2842 | "description" : "Indicates the directive is valid on an input object field SDL definition.",
2843 | "isDeprecated" : false,
2844 | "deprecationReason" : null
2845 | } ],
2846 | "possibleTypes" : null
2847 | } ],
2848 | "directives" : [ {
2849 | "name" : "include",
2850 | "description" : "Directs the executor to include this field or fragment only when the `if` argument is true",
2851 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2852 | "args" : [ {
2853 | "name" : "if",
2854 | "description" : "Included when true.",
2855 | "type" : {
2856 | "kind" : "NON_NULL",
2857 | "name" : null,
2858 | "ofType" : {
2859 | "kind" : "SCALAR",
2860 | "name" : "Boolean",
2861 | "ofType" : null
2862 | }
2863 | },
2864 | "defaultValue" : null
2865 | } ],
2866 | "onOperation" : false,
2867 | "onFragment" : true,
2868 | "onField" : true
2869 | }, {
2870 | "name" : "skip",
2871 | "description" : "Directs the executor to skip this field or fragment when the `if`'argument is true.",
2872 | "locations" : [ "FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT" ],
2873 | "args" : [ {
2874 | "name" : "if",
2875 | "description" : "Skipped when true.",
2876 | "type" : {
2877 | "kind" : "NON_NULL",
2878 | "name" : null,
2879 | "ofType" : {
2880 | "kind" : "SCALAR",
2881 | "name" : "Boolean",
2882 | "ofType" : null
2883 | }
2884 | },
2885 | "defaultValue" : null
2886 | } ],
2887 | "onOperation" : false,
2888 | "onFragment" : true,
2889 | "onField" : true
2890 | }, {
2891 | "name" : "defer",
2892 | "description" : "This directive allows results to be deferred during execution",
2893 | "locations" : [ "FIELD" ],
2894 | "args" : [ ],
2895 | "onOperation" : false,
2896 | "onFragment" : false,
2897 | "onField" : true
2898 | }, {
2899 | "name" : "aws_cognito_user_pools",
2900 | "description" : "Tells the service this field/object has access authorized by a Cognito User Pools token.",
2901 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2902 | "args" : [ {
2903 | "name" : "cognito_groups",
2904 | "description" : "List of cognito user pool groups which have access on this field",
2905 | "type" : {
2906 | "kind" : "LIST",
2907 | "name" : null,
2908 | "ofType" : {
2909 | "kind" : "SCALAR",
2910 | "name" : "String",
2911 | "ofType" : null
2912 | }
2913 | },
2914 | "defaultValue" : null
2915 | } ],
2916 | "onOperation" : false,
2917 | "onFragment" : false,
2918 | "onField" : false
2919 | }, {
2920 | "name" : "aws_publish",
2921 | "description" : "Tells the service which subscriptions will be published to when this mutation is called. This directive is deprecated use @aws_susbscribe directive instead.",
2922 | "locations" : [ "FIELD_DEFINITION" ],
2923 | "args" : [ {
2924 | "name" : "subscriptions",
2925 | "description" : "List of subscriptions which will be published to when this mutation is called.",
2926 | "type" : {
2927 | "kind" : "LIST",
2928 | "name" : null,
2929 | "ofType" : {
2930 | "kind" : "SCALAR",
2931 | "name" : "String",
2932 | "ofType" : null
2933 | }
2934 | },
2935 | "defaultValue" : null
2936 | } ],
2937 | "onOperation" : false,
2938 | "onFragment" : false,
2939 | "onField" : false
2940 | }, {
2941 | "name" : "deprecated",
2942 | "description" : null,
2943 | "locations" : [ "FIELD_DEFINITION", "ENUM_VALUE" ],
2944 | "args" : [ {
2945 | "name" : "reason",
2946 | "description" : null,
2947 | "type" : {
2948 | "kind" : "SCALAR",
2949 | "name" : "String",
2950 | "ofType" : null
2951 | },
2952 | "defaultValue" : "\"No longer supported\""
2953 | } ],
2954 | "onOperation" : false,
2955 | "onFragment" : false,
2956 | "onField" : false
2957 | }, {
2958 | "name" : "aws_oidc",
2959 | "description" : "Tells the service this field/object has access authorized by an OIDC token.",
2960 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2961 | "args" : [ ],
2962 | "onOperation" : false,
2963 | "onFragment" : false,
2964 | "onField" : false
2965 | }, {
2966 | "name" : "aws_subscribe",
2967 | "description" : "Tells the service which mutation triggers this subscription.",
2968 | "locations" : [ "FIELD_DEFINITION" ],
2969 | "args" : [ {
2970 | "name" : "mutations",
2971 | "description" : "List of mutations which will trigger this subscription when they are called.",
2972 | "type" : {
2973 | "kind" : "LIST",
2974 | "name" : null,
2975 | "ofType" : {
2976 | "kind" : "SCALAR",
2977 | "name" : "String",
2978 | "ofType" : null
2979 | }
2980 | },
2981 | "defaultValue" : null
2982 | } ],
2983 | "onOperation" : false,
2984 | "onFragment" : false,
2985 | "onField" : false
2986 | }, {
2987 | "name" : "aws_api_key",
2988 | "description" : "Tells the service this field/object has access authorized by an API key.",
2989 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2990 | "args" : [ ],
2991 | "onOperation" : false,
2992 | "onFragment" : false,
2993 | "onField" : false
2994 | }, {
2995 | "name" : "aws_iam",
2996 | "description" : "Tells the service this field/object has access authorized by sigv4 signing.",
2997 | "locations" : [ "OBJECT", "FIELD_DEFINITION" ],
2998 | "args" : [ ],
2999 | "onOperation" : false,
3000 | "onFragment" : false,
3001 | "onField" : false
3002 | }, {
3003 | "name" : "aws_auth",
3004 | "description" : "Directs the schema to enforce authorization on a field",
3005 | "locations" : [ "FIELD_DEFINITION" ],
3006 | "args" : [ {
3007 | "name" : "cognito_groups",
3008 | "description" : "List of cognito user pool groups which have access on this field",
3009 | "type" : {
3010 | "kind" : "LIST",
3011 | "name" : null,
3012 | "ofType" : {
3013 | "kind" : "SCALAR",
3014 | "name" : "String",
3015 | "ofType" : null
3016 | }
3017 | },
3018 | "defaultValue" : null
3019 | } ],
3020 | "onOperation" : false,
3021 | "onFragment" : false,
3022 | "onField" : false
3023 | } ]
3024 | }
3025 | }
3026 | }
--------------------------------------------------------------------------------
/src/graphql/subscriptions.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | // this is an auto generated file. This will be overwritten
3 |
4 | export const onCreateBook = /* GraphQL */ `
5 | subscription OnCreateBook {
6 | onCreateBook {
7 | id
8 | title
9 | author
10 | price
11 | description
12 | releaseDate
13 | }
14 | }
15 | `;
16 | export const onUpdateBook = /* GraphQL */ `
17 | subscription OnUpdateBook {
18 | onUpdateBook {
19 | id
20 | title
21 | author
22 | price
23 | description
24 | releaseDate
25 | }
26 | }
27 | `;
28 | export const onDeleteBook = /* GraphQL */ `
29 | subscription OnDeleteBook {
30 | onDeleteBook {
31 | id
32 | title
33 | author
34 | price
35 | description
36 | releaseDate
37 | }
38 | }
39 | `;
40 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import App from './App.vue';
3 | import router from './router';
4 | import Vuetify from 'vuetify';
5 | import awsconfig from './aws-exports';
6 | import Amplify, * as AmplifyModules from 'aws-amplify';
7 | import { AmplifyPlugin } from 'aws-amplify-vue';
8 | import vuetify from './plugins/vuetify';
9 |
10 | Amplify.configure(awsconfig);
11 | Vue.use(AmplifyPlugin, AmplifyModules, Vuetify);
12 | new Vue({
13 | router,
14 | vuetify,
15 | render: h => h(App)
16 | }).$mount('#app');
17 |
--------------------------------------------------------------------------------
/src/plugins/vuetify.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuetify from 'vuetify/lib';
3 |
4 | Vue.use(Vuetify);
5 |
6 | export default new Vuetify({
7 | });
8 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueRouter from 'vue-router';
3 | import RestRegister from '../views/RestRegister';
4 | import RestSearch from '../views/RestSearch';
5 | import GraphqlRegister from '../views/GraphqlRegister';
6 | import GraphqlSearch from '../views/GraphqlSearch';
7 | import Welcome from '../views/Welcome';
8 |
9 | Vue.use(VueRouter);
10 |
11 | const routes = [
12 | {
13 | path: '/',
14 | name: 'Welcome',
15 | component: Welcome
16 | },
17 | {
18 | path: '/rest/register',
19 | name: 'RestRegister',
20 | component: RestRegister
21 | },
22 | {
23 | path: '/rest/search',
24 | name: 'RestSearch',
25 | component: RestSearch
26 | },
27 | {
28 | path: '/graphql/register',
29 | name: 'GraphqlRegister',
30 | component: GraphqlRegister
31 | },
32 | {
33 | path: '/graphql/search',
34 | name: 'GraphqlSearch',
35 | component: GraphqlSearch
36 | }
37 | ];
38 |
39 | const router = new VueRouter({
40 | mode: 'history',
41 | base: process.env.BASE_URL,
42 | routes
43 | });
44 |
45 | export default router;
46 |
--------------------------------------------------------------------------------
/src/views/GraphqlRegister.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ snackbarText }}
11 | Close
12 |
13 |
14 |
15 |
16 |
17 |
56 |
--------------------------------------------------------------------------------
/src/views/GraphqlSearch.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{ snackbarText }}
16 | Close
17 |
18 |
19 |
20 |
21 |
22 |
83 |
--------------------------------------------------------------------------------
/src/views/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Search Books App
7 | REST or GraphQL
8 |
9 |
10 |
11 |
12 |
13 | REST
14 |
15 |
16 |
17 |
18 | {{ icon }}
19 |
20 |
21 | {{ title }}
22 |
23 |
24 |
25 |
26 |
27 |
28 | GraphQL
29 |
30 |
31 |
32 |
33 | {{ icon }}
34 |
35 |
36 | {{ title }}
37 |
38 |
39 |
40 |
41 |
42 |
43 | Logout
44 |
45 |
46 |
47 |
48 |
49 | Amplify Data Search Sample
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
84 |
90 |
--------------------------------------------------------------------------------
/src/views/RestRegister.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ snackbarText }}
11 | Close
12 |
13 |
14 |
15 |
16 |
17 |
54 |
--------------------------------------------------------------------------------
/src/views/RestSearch.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{ snackbarText }}
16 | Close
17 |
18 |
19 |
20 |
21 |
22 |
64 |
--------------------------------------------------------------------------------
/src/views/Welcome.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome Search Books Sample!
5 |
6 |
7 |
8 |
9 |
12 |
13 |
18 |
--------------------------------------------------------------------------------
/tests/unit/example.spec.js:
--------------------------------------------------------------------------------
1 | import { shallowMount } from '@vue/test-utils';
2 | import Welcome from '@/views/Welcome.vue';
3 |
4 | describe('Welcome.vue', () => {
5 | it('renders Welcome component', () => {
6 | const wrapper = shallowMount(Welcome);
7 | const msg = 'Welcome Search Books Sample!';
8 | expect(wrapper.text()).toMatch(msg);
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/tests/unit/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuetify from 'vuetify';
3 |
4 | Vue.use(Vuetify);
5 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | var path = require("path");
2 | module.exports = {
3 | devServer: {
4 | disableHostCheck: true,
5 | },
6 | transpileDependencies: ["vuetify"],
7 | configureWebpack: {
8 | resolve: {
9 | alias: {
10 | vue$: "vue/dist/vue.esm.js",
11 | "@": path.resolve(__dirname, "src/"),
12 | },
13 | },
14 | },
15 | };
16 |
--------------------------------------------------------------------------------