-
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
Showing
5 changed files
with
155 additions
and
141 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "olympus", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Example of using GraphQL Demeter", | ||
"private": true, | ||
"main": "index.js", | ||
|
@@ -10,6 +10,6 @@ | |
"author": "Aexol <[email protected]> (http://aexol.com)", | ||
"license": "ISC", | ||
"dependencies": { | ||
"graphql-demeter": "^1.0.4" | ||
"graphql-demeter": "^1.0.5" | ||
} | ||
} |
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,175 +1,176 @@ | ||
"""Aws S3 File""" | ||
type S3Object { | ||
"""""" | ||
bucket: String! | ||
|
||
"""""" | ||
key: String! | ||
|
||
"""""" | ||
region: String! | ||
type Beer implements Product{ | ||
name: String! | ||
SKU: String! | ||
price: Int! | ||
kind: BeerKind | ||
} | ||
|
||
"""""" | ||
union ChangeCard = SpecialCard | EffectCard | ||
|
||
"""""" | ||
enum SpecialSkills { | ||
"""Lower enemy defense -5<br>""" | ||
THUNDER | ||
|
||
"""Attack multiple Cards at once<br>""" | ||
RAIN | ||
|
||
"""50% chance to avoid any attack<br>""" | ||
FIRE | ||
type ClientQuery{ | ||
menu: [Product!]! | ||
} | ||
|
||
"""Card used in card game<br>""" | ||
type Card implements Nameable { | ||
"""The attack power<br>""" | ||
Attack: Int! | ||
|
||
"""<div>How many children the greek god had</div>""" | ||
Children: Int | ||
|
||
"""The defense power<br>""" | ||
Defense: Int! | ||
|
||
"""Attack other cards on the table , returns Cards after attack<br>""" | ||
attack( | ||
"""Attacked card/card ids<br>""" | ||
cardID: [String!]! | ||
): [Card!] | ||
|
||
"""Put your description here""" | ||
cardImage: S3Object | ||
|
||
"""Description of a card<br>""" | ||
description: String! | ||
|
||
"""""" | ||
id: ID! | ||
|
||
"""""" | ||
image: String! | ||
|
||
"""""" | ||
info: JSON! | ||
type Query{ | ||
clientQuery: ClientQuery! | ||
pubQuery: PubQuery! | ||
restProxy: Anything | ||
getFile( | ||
fileKey: String! | ||
): String | ||
} | ||
|
||
"""The name of a card<br>""" | ||
name: String! | ||
scalar Anything | ||
|
||
"""""" | ||
skills: [SpecialSkills!] | ||
input ProxyInput{ | ||
val: String! | ||
} | ||
|
||
"""""" | ||
interface Nameable { | ||
"""""" | ||
name: String! | ||
type Order{ | ||
number: Int! | ||
createdAt: String! | ||
orderedBeers: [OrderedBeer!]! | ||
} | ||
|
||
"""""" | ||
scalar JSON | ||
|
||
"""""" | ||
type Powerup { | ||
"""""" | ||
name: String | ||
type OrderedBeer{ | ||
quantity: Int! | ||
beer: Beer! | ||
} | ||
|
||
"""""" | ||
type Mutation { | ||
"""add Card to Cards database<br>""" | ||
addCard(card: createCard!): Card! | ||
type PubQuery{ | ||
orders: [Order!]! | ||
} | ||
|
||
"""Stack of cards""" | ||
type CardStack implements Nameable { | ||
"""""" | ||
cards: [Card!] | ||
|
||
"""""" | ||
name: String! | ||
type PubMutation{ | ||
submitOrder( | ||
order: SubmitOrder! | ||
): Boolean | ||
addBeer( | ||
beer: AddBeer! | ||
): Boolean | ||
editBeer( | ||
editBeer: EditBeer! | ||
sku: SKUInput! | ||
): Boolean | ||
removeBeer( | ||
sku: SKUInput! | ||
): Boolean | ||
cancelOrder( | ||
orderDetail: OrderDetail! | ||
): Boolean | ||
uploadFile( | ||
fileInput: FileInput! | ||
): FileUploadResponse! | ||
addSnack( | ||
snack: AddSnack! | ||
): Boolean | ||
editSnack( | ||
sku: SKUInput! | ||
snack: EditSnack! | ||
): Boolean | ||
deleteSnack: Boolean | ||
} | ||
|
||
"""""" | ||
type Public { | ||
"""""" | ||
powerups(filter: String!): [Powerup!] | ||
input FileInput{ | ||
filename: String! | ||
contentType: String! | ||
} | ||
|
||
"""""" | ||
type Query { | ||
"""""" | ||
cardById(cardId: String): Card | ||
|
||
"""Draw a card<br>""" | ||
drawCard: Card! | ||
type FileUploadResponse{ | ||
putUrl: String! | ||
fileKey: String! | ||
} | ||
|
||
"""""" | ||
drawChangeCard: ChangeCard! | ||
input AddBeer{ | ||
name: String! | ||
SKU: String! | ||
price: Int! | ||
kind: BeerKind | ||
} | ||
|
||
"""list All Cards availble<br>""" | ||
listCards: [Card!]! | ||
input EditBeer{ | ||
name: String | ||
price: Int | ||
kind: BeerKind | ||
} | ||
|
||
"""""" | ||
myStacks: [CardStack!] | ||
input SKUInput{ | ||
SKU: String! | ||
} | ||
|
||
"""""" | ||
nameables: [Nameable!]! | ||
input SubmitOrder{ | ||
productInOrder: [ProductInOrder!]! = [] | ||
} | ||
|
||
"""""" | ||
public: Public | ||
input ProductInOrder{ | ||
SKU: String! | ||
quantity: Int! | ||
} | ||
|
||
"""""" | ||
type Subscription { | ||
"""""" | ||
deck: [Card!] | ||
input OrderDetail{ | ||
number: Int! | ||
} | ||
|
||
"""""" | ||
type SpecialCard implements Nameable { | ||
"""""" | ||
effect: String! | ||
type Mutation{ | ||
pubMutation: PubMutation | ||
""" | ||
user | ||
""" | ||
register( | ||
user: RegisterInput! | ||
): RegisterResponse! | ||
} | ||
|
||
"""""" | ||
name: String! | ||
type RegisterResponse{ | ||
registered: Boolean | ||
hasError: RegisterErrors | ||
} | ||
|
||
"""""" | ||
type EffectCard implements Nameable { | ||
"""""" | ||
effectSize: Float! | ||
input RegisterInput{ | ||
username: String! | ||
password: String! | ||
invitationToken: String | ||
} | ||
|
||
"""""" | ||
name: String! | ||
enum RegisterErrors{ | ||
USERNAME_EXISTS | ||
PASSWORD_WEAK | ||
INVITE_DOMAIN_INCORRECT | ||
LINK_EXPIRED | ||
USERNAME_INVALID | ||
} | ||
|
||
"""create card inputs<br>""" | ||
input createCard { | ||
"""The name of a card<br>""" | ||
name: String! | ||
schema{ | ||
query: Query | ||
mutation: Mutation | ||
} | ||
|
||
"""Description of a card<br>""" | ||
description: String! | ||
enum BeerKind{ | ||
IPA | ||
APA | ||
Lager | ||
Sour | ||
Ale | ||
} | ||
|
||
"""<div>How many children the greek god had</div>""" | ||
Children: Int | ||
interface Product{ | ||
SKU: String! | ||
name: String! | ||
price: Int! | ||
} | ||
|
||
"""The attack power<br>""" | ||
Attack: Int! | ||
type Snack implements Product{ | ||
SKU: String! | ||
name: String! | ||
price: Int! | ||
} | ||
|
||
"""The defense power<br>""" | ||
Defense: Int! | ||
input AddSnack{ | ||
SKU: String! | ||
name: String! | ||
price: Int! | ||
} | ||
|
||
"""input skills""" | ||
skills: [SpecialSkills!] | ||
input EditSnack{ | ||
SKU: String | ||
name: String | ||
price: Int | ||
} | ||
schema{ | ||
query: Query, | ||
mutation: Mutation, | ||
subscription: Subscription | ||
} |
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
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
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