-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79e90d5
commit 7f5c54b
Showing
25 changed files
with
729 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "Scan" | ||
#if( ${context.arguments.count} ) | ||
,"limit": $util.toJson($context.arguments.count) | ||
#end | ||
#if( ${context.arguments.nextToken} ) | ||
,"nextToken": $util.toJson($context.arguments.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"batches": $utils.toJson($context.result.items) | ||
#if( ${context.result.nextToken} ) | ||
,"nextToken": $util.toJson($context.result.nextToken) | ||
#end | ||
} |
10 changes: 10 additions & 0 deletions
10
amplify/backend/api/rms/resolvers/Query.allHistory.req.vtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "Scan" | ||
#if( ${context.arguments.count} ) | ||
,"limit": $util.toJson($context.arguments.count) | ||
#end | ||
#if( ${context.arguments.nextToken} ) | ||
,"nextToken": $util.toJson($context.arguments.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"histories": $utils.toJson($context.result.items) | ||
#if( ${context.result.nextToken} ) | ||
,"nextToken": $util.toJson($context.result.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"items": $utils.toJson($context.result.items) | ||
#if( ${context.result.nextToken} ) | ||
,"nextToken": $util.toJson($context.result.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "Scan" | ||
#if( ${context.arguments.count} ) | ||
,"limit": $util.toJson($context.arguments.count) | ||
#end | ||
#if( ${context.arguments.nextToken} ) | ||
,"nextToken": $util.toJson($context.arguments.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "Scan" | ||
#if( ${context.arguments.count} ) | ||
,"limit": $util.toJson($context.arguments.count) | ||
#end | ||
#if( ${context.arguments.nextToken} ) | ||
,"nextToken": $util.toJson($context.arguments.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"mains": $utils.toJson($context.result.items) | ||
#if( ${context.result.nextToken} ) | ||
,"nextToken": $util.toJson($context.result.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "Scan" | ||
#if( ${context.arguments.count} ) | ||
,"limit": $util.toJson($context.arguments.count) | ||
#end | ||
#if( ${context.arguments.nextToken} ) | ||
,"nextToken": $util.toJson($context.arguments.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"tags": $utils.toJson($context.result.items) | ||
#if( ${context.result.nextToken} ) | ||
,"nextToken": $util.toJson($context.result.nextToken) | ||
#end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "GetItem", | ||
"key" : { | ||
"id" : $util.dynamodb.toDynamoDBJson($ctx.args.id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$utils.toJson($context.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "GetItem", | ||
"key" : { | ||
"id" : $util.dynamodb.toDynamoDBJson($ctx.args.id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$utils.toJson($context.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "GetItem", | ||
"key" : { | ||
"id" : $util.dynamodb.toDynamoDBJson($ctx.args.id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$utils.toJson($context.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "GetItem", | ||
"key" : { | ||
"id" : $util.dynamodb.toDynamoDBJson($ctx.args.id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$utils.toJson($context.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version" : "2017-02-28", | ||
"operation" : "GetItem", | ||
"key" : { | ||
"id" : $util.dynamodb.toDynamoDBJson($ctx.args.id) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$utils.toJson($context.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,76 @@ | ||
type Todo @model { | ||
id: ID! | ||
name: String! | ||
description: String | ||
type Query { | ||
allMain(count: Int, nextToken: String): PaginatedMains! | ||
allItems(count: Int, nextToken: String): PaginatedItems! | ||
allBatch(count: Int, nextToken: String): PaginatedBatches! | ||
allTags(count: Int, nextToken: String): PaginatedTags! | ||
allHistory(count: Int, nextToken: String): PaginatedHistories! | ||
} | ||
|
||
type Main @model @auth(rules: [{allow: public, operations: [read]}]) { | ||
name: ID! | ||
displayName: String! | ||
description: String | ||
tags: [String!] | ||
items: [String!] | ||
} | ||
|
||
type PaginatedMains { | ||
mains: [Main!]! | ||
nextToken: String | ||
} | ||
|
||
type Items @model @auth(rules: [{allow: public, operations: [read]}]) { | ||
id: ID! | ||
name: String! | ||
owner: String! | ||
borrower: String! | ||
batch: [String!] | ||
history: [String!] | ||
schedule: [String!] | ||
notes: String | ||
} | ||
|
||
type PaginatedItems { | ||
items: [Items!]! | ||
nextToken: String | ||
} | ||
|
||
type Batch @model @auth(rules: [{allow: public, operations: [read]}]) { | ||
key: ID! | ||
val: [String!] | ||
} | ||
|
||
type PaginatedBatches { | ||
batches: [Batch!]! | ||
nextToken: String | ||
} | ||
|
||
type Tags @model @auth(rules: [{allow: public, operations: [read]}]) { | ||
key: ID! | ||
val: [String!] | ||
} | ||
|
||
type PaginatedTags { | ||
tags: [Tags!]! | ||
nextToken: String | ||
} | ||
|
||
type History @model @auth(rules: [{allow: public, operations: [read]}]) { | ||
key: ID! | ||
name: String! | ||
id: String! | ||
borrower: String! | ||
action: Action! | ||
notes: String | ||
timestamp: Int! | ||
} | ||
|
||
type PaginatedHistories { | ||
histories: [History!]! | ||
nextToken: String | ||
} | ||
|
||
enum Action { | ||
borrow | ||
return | ||
} |
Oops, something went wrong.