Skip to content

rodrigojv/dcheroes

Repository files navigation

Welcome to dcheroes 👋

A public GraphQL API for DC Heroes and Characters.

Inspired by SWAPI, the Star Wars GraphQL API. Aimed to be used as a tool to learn/teach GraphQL, or just to play around 🥰.

Uses a json file as a datasource, which was manually consolidated from info found in the official DC web site

Docs

Try out the queries and explore the schema on the playground.

You can query a single character by name.

{
  character(name: "Superman") {
    name
    alterEgo
    occupation
    powers
  }
}

With the following json as a result:

  "data": {
    "character": {
      "name": "Superman",
      "alterEgo": "Clark Kent, Kal-El",
      "occupation": "Reporter",
      "powers": "super strength, flight, invulnerability, super speed, heat vision, freeze breath, x-ray vision, superhuman hearing, healing factor"
    }
  }
}

Or you can also query a collection of characters, villains, heroes and teams. Each of those queries with an optional filter parameter that includes a keyword field.

Example:

{
  characters(filter: { keyword: "reporter" }) {
    name
  }
}

Will produce as a result the following json:

{
  "data": {
    "characters": [
      {
        "name": "Jimmy Olsen"
      },
      {
        "name": "Lois Lane"
      },
      {
        "name": "Superman"
      }
    ]
  }
}

Todo

  • Movie/TV appearances for each character
  • Actors who played, voiced the characters
  • Custom domain name

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

About

A GraphQL API for DC characters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published