Skip to content

Commit

Permalink
GH-54: Added GraphQL Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyhchen committed Jul 20, 2021
1 parent ec54430 commit b64fb54
Show file tree
Hide file tree
Showing 9 changed files with 1,099 additions and 659 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
}
}
87 changes: 83 additions & 4 deletions amplify/backend/api/rms/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
type Todo @model {
id: ID!
name: String!
description: String
#schema {
# query:Query
#}

#type Query {

# listMainSchema: [MainSchema]
#}

#one to many from items field to Item
type Main @model {
name: ID!
description: String!
tags: [String!]
items: [Item] @connection(name: "itemId")
}

type Item @model {
id: ID!
type: Main @connection
owner: String!
borrower: String!
batch: [String!]
history: [String!]
schedule: [String!]
notes: String!
}

type Items @model {
key: ID!
val: String!
}

type Batch @model {
key: ID!
val: [String!]
}

type Tags @model {
key: ID!
val: [String!]
}

type History @model {
key: ID!
name: String
id: String
borrower: String
action: Action
notes: String
timestamp: Number
}

#type Transactions @model {
# number: String
# type: String
# scratch: any
#}

enum Action {
borrow
return
}

#type MainSchema @model {
# name: String!
# description: String!
# tags: [String!]
# items: [IDItemSchema!]
#}
#
#type IDItemSchema {
# key: ID!
# value: ItemSchema!
#}
#
#type ItemSchema {
# owner: String!
# borrower: String!
# batch: [String!]
# history: [String!]
# schedule: [String!]
# notes: String!
#}
8 changes: 7 additions & 1 deletion amplify/backend/api/rms/transform.conf.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Version": 5,
"ElasticsearchWarning": true
"ElasticsearchWarning": true,
"ResolverConfig": {
"project": {
"ConflictHandler": "AUTOMERGE",
"ConflictDetection": "VERSION"
}
}
}
10 changes: 9 additions & 1 deletion amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,15 @@
"defaultAuthentication": {
"authenticationType": "AWS_IAM"
},
"additionalAuthenticationProviders": []
"additionalAuthenticationProviders": [
{
"authenticationType": "API_KEY",
"apiKeyConfig": {
"apiKeyExpirationDays": 30,
"description": "api key description"
}
}
]
}
}
}
Expand Down
10 changes: 1 addition & 9 deletions amplify/backend/function/BorrowBatch/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b64fb54

Please sign in to comment.