1+ interface Nameable {
2+ name : String !
3+ }
4+
5+ enum SpecialSkills {
6+ """Lower enemy defense -5<br>"""
7+ THUNDER
8+
9+ """Attack multiple Cards at once<br>"""
10+ RAIN
11+
12+ """50% chance to avoid any attack<br>"""
13+ FIRE
14+ }
15+
16+ type Query {
17+ cardById (cardId : String ): Card
18+
19+ """Draw a card<br>"""
20+ drawCard : Card !
21+ drawChangeCard : ChangeCard !
22+
23+ """list All Cards availble<br>"""
24+ listCards : [Card ! ]!
25+ myStacks : [CardStack ! ]
26+ nameables : [Nameable ! ]!
27+ public : Public
28+ }
29+
30+ """create card inputs<br>"""
31+ input createCard {
32+ """The name of a card<br>"""
33+ name : String !
34+
35+ """Description of a card<br>"""
36+ description : String !
37+
38+ """<div>How many children the greek god had</div>"""
39+ Children : Int
40+
41+ """The attack power<br>"""
42+ Attack : Int !
43+
44+ """The defense power<br>"""
45+ Defense : Int !
46+
47+ """input skills"""
48+ skills : [SpecialSkills ! ]
49+ }
50+
51+ """Stack of cards"""
52+ type CardStack implements Nameable {
53+ cards : [Card ! ]
54+ name : String !
55+ }
56+
57+ """Card used in card game<br>"""
58+ type Card implements Nameable {
59+ """The attack power<br>"""
60+ Attack : Int !
61+
62+ """<div>How many children the greek god had</div>"""
63+ Children : Int
64+
65+ """The defense power<br>"""
66+ Defense : Int !
67+
68+ """Attack other cards on the table , returns Cards after attack<br>"""
69+ attack (
70+ """Attacked card/card ids<br>"""
71+ cardID : [String ! ]!
72+ ): [Card ! ]
73+
74+ """Put your description here"""
75+ cardImage : S3Object
76+
77+ """Description of a card<br>"""
78+ description : String !
79+ id : ID !
80+ image : String !
81+ info : JSON !
82+
83+ """The name of a card<br>"""
84+ name : String !
85+ skills : [SpecialSkills ! ]
86+ testFn (test : String ): String
87+ }
88+
89+ type SpecialCard implements Nameable {
90+ effect : String !
91+ name : String !
92+ }
93+
94+ type EffectCard implements Nameable {
95+ effectSize : Float !
96+ name : String !
97+ }
98+
99+ type Mutation {
100+ """add Card to Cards database<br>"""
101+ addCard (card : createCard ! ): Card !
102+ }
103+
104+ scalar JSON
105+
106+ """Aws S3 File"""
107+ type S3Object {
108+ bucket : String !
109+ key : String !
110+ region : String !
111+ }
112+
113+ type Public {
114+ powerups (filter : String ! ): [Powerup ! ]
115+ }
116+
117+ type Powerup {
118+ name : String
119+ }
120+
121+ union ChangeCard = SpecialCard | EffectCard
122+
123+ type Subscription {
124+ deck : [Card ! ]
125+ }
126+ schema {
127+ query : Query ,
128+ mutation : Mutation ,
129+ subscription : Subscription
130+ }
0 commit comments