Open brunolcarli opened 1 year ago
Implementar models conforme:
Implementar consultas GraphQL na API conforme https://github.com/brunolcarli/ggj23_server/issues/11
🆗
Snippet de exemplo:
mutation create_char{
createCharacter(input: {
name: "spam"
characterClass: TANKER
username: "spam"
email: "spam@eggs"
}){
character {
name
lv
nextLv
exp
maxHp
maxSp
currentHp
currentSp
power
resistance
agility
isKo
isLogged
lastActivity
positionX
positionY
areaLocation
classType
aim
skills {
name
spCost
power
range
description
effect {
duration
value
condition
}
}
}
}
}
🆗
Snippet d exemplo:
query characters{
characters {
name
lv
nextLv
exp
maxHp
maxSp
currentHp
currentSp
power
resistance
agility
isKo
isLogged
lastActivity
positionX
positionY
areaLocation
classType
aim
quests{
name
completed
description
}
equipment{
head {
name
description
}
torso{
name
description
}
legs{
name
description
}
weapon{
name
description
}
shield{
name
description
}
accessory1{
name
description
}
accessory2{
name
description
}
}
effects{
targetAttributes
duration
value
condition
}
items{
name
kind
effect{
targetAttributes
duration
value
condition
}
count
}
skills{
name
spCost
power
range
description
classes
effect{
targetAttributes
duration
value
condition
}
}
}
}
🆗
Snippet de exemplo:
query skills {
skills {
name
spCost
power
range
description
effect {
targetAttributes
duration
value
condition
}
}
}
Snippet de exemplo:
query map_areas{
mapAreas {
name
sizeX
sizeY
connections
}
}
Snippet de exemplo:
mutation charlogin {
characterLogin(input: {
id: "1"
}){
logStatus
}
}
Snippet de exemplo:
mutation charlogout {
characterLogout(input: {
id: "1"
}){
logStatus
}
}
Snippet de exemplo:
mutation update_pos{
updatePosition(input: {
id: "1"
location: {
x: 240
y: 240
}
}){
character{
positionX
positionY
name
}
}
}
Snippet de exemplo:
mutation use_skill {
characterUseSkill(input:{
skillUserId: "1"
targetId: "2"
skillName: "base_attack"
}){
result
}
}
URL da API: https://ggj23server.brunolcarli.repl.co/graphql/