Skip to content

Commit 6d57d60

Browse files
committed
Further graphql additions
1 parent 7ef4be5 commit 6d57d60

20 files changed

Lines changed: 537 additions & 35 deletions

File tree

.yarn/install-state.gz

7.03 KB
Binary file not shown.

spellsource-client/src/unity

Submodule unity updated from aa4708b to f4a1faa

spellsource-graphql/graphql/shared/fragments/gameState.graphql

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,29 @@ fragment gameState on GameState {
66
turnNumber
77
turnState
88
timestamp
9+
hasPowerHistory
10+
powerHistory {
11+
eventType
12+
id
13+
description
14+
isPowerHistory
15+
isSourcePlayerLocal
16+
isTargetPlayerLocal
17+
source {
18+
...entitySummary
19+
}
20+
target {
21+
...entitySummary
22+
}
23+
targets {
24+
...entitySummary
25+
}
26+
value
27+
cardEvent {
28+
card {
29+
...entitySummary
30+
}
31+
showLocal
32+
}
33+
}
934
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mutation addFriend($friendId: String, $usernameWithToken: String) {
2+
addFriend(friendId: $friendId, usernameWithToken: $usernameWithToken) {
3+
friendId
4+
friendName
5+
presence
6+
since
7+
}
8+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
mutation connectToGame($playerKey: String!, $playerSecret: String!) {
1+
mutation connectToGame($playerKey: String, $playerSecret: String) {
22
connectToGame(playerKey: $playerKey, playerSecret: $playerSecret)
33
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mutation deleteEditableCard($editableCardId: String!) {
2+
deleteCard(editableCardId: $editableCardId)
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mutation putCard($input: PutCardInput!) {
2+
putCard(input: $input) {
3+
cardId
4+
editableCardId
5+
cardScriptErrors
6+
}
7+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mutation removeFriend($friendId: String!) {
2+
removeFriend(friendId: $friendId)
3+
}

spellsource-graphql/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"jwks-rsa": "^3.1.0",
2727
"postgraphile": "^5.0.0-beta.37",
2828
"postgraphile-plugin-connection-filter": "^3.0.0-beta.1",
29+
"subscriptions-transport-ws": "^0.11.0",
2930
"ws": "^8.18.3"
3031
},
3132
"devDependencies": {

spellsource-graphql/schema.graphql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ type Mutation {
707707
"""
708708
Connect to an active game. Must be called before gameMessages subscription will emit.
709709
"""
710-
connectToGame(playerKey: String!, playerSecret: String!): Boolean!
710+
connectToGame(playerKey: String, playerSecret: String): Boolean!
711711

712712
"""Send a game action in response to an ON_REQUEST_ACTION message."""
713713
sendGameAction(actionIndex: Int!, repliesTo: String!): Boolean!
@@ -794,6 +794,7 @@ type PublishedCard implements Node {
794794
): CardsInDecksConnection!
795795
}
796796

797+
"""A 64-bit integer serialized as a string for JavaScript compatibility"""
797798
scalar BigInt
798799

799800
type Card implements Node {
@@ -4407,6 +4408,8 @@ type GameState {
44074408
turnNumber: Int!
44084409
turnState: String!
44094410
timestamp: BigInt!
4411+
powerHistory: [GameEvent!]
4412+
hasPowerHistory: Boolean!
44104413
}
44114414

44124415
type GetCardsResponse {

0 commit comments

Comments
 (0)