Skip to content

Commit

Permalink
GH-54: Create a new GraphQL schema
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyhchen committed Aug 2, 2021
1 parent 2abdbb3 commit 4029385
Show file tree
Hide file tree
Showing 11 changed files with 1,581 additions and 740 deletions.
2 changes: 1 addition & 1 deletion amplify/backend/api/rms/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"DynamoDBModelTableWriteIOPS": 1,
"DynamoDBEnablePointInTimeRecovery": false,
"DynamoDBEnableServerSideEncryption": false
}
}
46 changes: 42 additions & 4 deletions amplify/backend/api/rms/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
type Todo @model {
id: ID!
name: String!
description: String
type Main @model @auth(rules: [{allow: public, operations: [read]}]) {
name: ID!
displayName: String!
description: String!
tags: [String!]
items: [Items]
}

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 Batch @model @auth(rules: [{allow: public, operations: [read]}]) {
key: ID!
val: [String!]
}

type Tags @model @auth(rules: [{allow: public, operations: [read]}]) {
key: ID!
val: [String!]
}

type History @model @auth(rules: [{allow: public, operations: [read]}]) {
key: ID!
name: String
id: String
borrower: String
action: Action
notes: String
timestamp: AWSDateTime
}

enum Action {
borrow
return
}
9 changes: 6 additions & 3 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,12 @@
"output": {
"authConfig": {
"defaultAuthentication": {
"authenticationType": "AWS_IAM"
},
"additionalAuthenticationProviders": []
"authenticationType": "API_KEY",
"apiKeyConfig": {
"apiKeyExpirationDays": 30,
"description": "api key description"
}
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions amplify/backend/function/BorrowBatch/amplify.state
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pluginId": "amplify-nodejs-function-runtime-provider",
"functionRuntime": "nodejs",
"defaultEditorFile": "src/index.js",
"useLegacyBuild": true
}
Loading

0 comments on commit 4029385

Please sign in to comment.