-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesign.txt
More file actions
36 lines (31 loc) · 2.72 KB
/
design.txt
File metadata and controls
36 lines (31 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
* @GraphQLServer Name=graphApiGatewayQuery run on LAMBDA
FOR EVERY (Query)
POST /query using NONE authorization with ApiKey=false
listBooks [] => ListType() will execute @GraphQLResolver=listBookFunction
getBook [title=String] => NamedType() will execute @GraphQLResolver=getBookFunction
* @GraphQLServer Name=graphApiGatewayMutation run on LAMBDA
FOR EVERY (Mutation)
POST /book/admin using SIGV4 authorization with ApiKey=true
addBook [title=String, author=AuthorInput] => ListType() will execute @GraphQLResolverSet=addBookFunctionSet
Function=checkBookExisted() onSuccess=addNewBook() onFailure=doneNewBook() RetryOnFailure=3
Function=addNewBook() onSuccess=doneNewBook() onFailure=errorNewBook() RetryOnFailure=
Function=doneNewBook() onSuccess=DONE() onFailure=DONE() RetryOnFailure=
Function=errorNewBook() onSuccess=DONE() onFailure=DONE() RetryOnFailure=
deleteBook [title=String, author=AuthorInput] => NamedType() will execute @GraphQLResolver=deleteBookFunction
POST /book/user using COGNITO authorization with ApiKey=
readBook [title=String, author=AuthorInput] => NamedType() will execute @GraphQLResolver=readBookFunction
Method=checkBookPaid() onSuccess=readNewBook() onFailure=errorPaidBook() RetryOnFailure=
Method=readNewBook() onSuccess=doneReadBook() onFailure=DONE() RetryOnFailure=
Method=doneReadBook() onSuccess=DONE() onFailure=DONE() RetryOnFailure=
Method=errorPaidBook() onSuccess=DONE() onFailure=DONE() RetryOnFailure=
likeBook [title=String, author=AuthorInput] => NamedType() will execute @GraphQLResolver=likeBookFunction
* Will execute Function=onBookSchedule on EVENT_RULE=scheduleOnBookEvent(every(10 mins)) => accessible to [Book] with Access=READ_ONLY
* Will execute Function=onAuthorSchedule on TABLE_STORAGE=starwarsBookTable(UPDATE|CREATE) => accessible to [Author] with Access=READ_WRITE
* [Book] persists on DataSource=TABLE_STORAGE@starwarsBookTable has Indexes=title:String,
* [Author] persists on DataSource=BLOB_STORAGE@starwarsAuthorStorage has Indexes=name:String
* [DataInput] AuthorInput { name=[object Object], type=[object Object] }
* [EnumObject] AuthorType { ROMAN, SCIENTIST }
* [DataObject] Book { title=[object Object], author=[object Object], comments=[object Object], outofstock=[object Object], types=[object Object] }
* [DataObject] Author { id=[object Object], name=[object Object], type=[object Object] }
- [DataObject] Query { listBooks (...) getBook (...) }
- [DataObject] Mutation { addBook (...) deleteBook (...) readBook (...) likeBook (...) }