Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementar models e serializadores da API #13

Open
brunolcarli opened this issue Jan 30, 2023 · 10 comments
Open

Implementar models e serializadores da API #13

brunolcarli opened this issue Jan 30, 2023 · 10 comments

Comments

@brunolcarli
Copy link
Owner

brunolcarli commented Jan 30, 2023

URL da API: https://ggj23server.brunolcarli.repl.co/graphql/

@brunolcarli brunolcarli converted this from a draft issue Jan 30, 2023
@brunolcarli brunolcarli changed the title Implementar models Implementar models e serializadores da API Jan 30, 2023
@brunolcarli
Copy link
Owner Author

Implementar models conforme:

#11

@brunolcarli
Copy link
Owner Author

Implementar consultas GraphQL na API conforme #11

@brunolcarli brunolcarli moved this from 🔖 Ready to 🏗 In progress in GGJ23 Game Project Jan 30, 2023
@brunolcarli
Copy link
Owner Author

brunolcarli commented Feb 1, 2023

Requisição para criar personagem

🆗

Image

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
        }
      }
    }
  }
}

@brunolcarli
Copy link
Owner Author

Consultar personagens

🆗

Image

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
      }
    }
  }
}

@brunolcarli
Copy link
Owner Author

Consultar skills

🆗

Image

Snippet de exemplo:

query skills {
  skills {
    name
    spCost
    power
    range
    description
    effect {
      targetAttributes
      duration
      value
      condition
    }
  }
}

@brunolcarli
Copy link
Owner Author

Consultar mapas

Image

Snippet de exemplo:

query map_areas{
  mapAreas {
    name
    sizeX
    sizeY
    connections
  }
}

@brunolcarli
Copy link
Owner Author

Logar com personagem

Image

Snippet de exemplo:

mutation charlogin {
  characterLogin(input: {
    id: "1"
  }){
    logStatus
  }
}

@brunolcarli
Copy link
Owner Author

Deslogar personagem

Image

Snippet de exemplo:

mutation charlogout {
  characterLogout(input: {
    id: "1"
  }){
    logStatus
  }
}

@brunolcarli
Copy link
Owner Author

Mover personagem

Image

Snippet de exemplo:

mutation update_pos{
  updatePosition(input: {
    id: "1"
    location: {
      x: 240
      y: 240
    }
  }){
    character{
      positionX
      positionY
      name
    }
  }
}

@brunolcarli
Copy link
Owner Author

Usar skill

Image

Snippet de exemplo:

mutation use_skill {
  characterUseSkill(input:{
    skillUserId: "1"
    targetId: "2"
    skillName: "base_attack"
  }){
    result
  }
}

@brunolcarli brunolcarli moved this from 🏗 In progress to 👀 In review in GGJ23 Game Project Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

No branches or pull requests

1 participant