Skip to content

0-don/igdb-graphql

Repository files navigation

Logo

igdb-graphql

Test it out · Report Bug · Request Feature

IGDB.com wrapper Graphql API with working relation fetch.

About The Project

Currently only games inputs finished, everything else works fine feel free to add more to it.

Examples

1. Simple

  • Query
query Games($where: GamesWhereInput) {
  games(where: $where) {
      id
        follows
        hypes
        name
        status
  }
}
  • Variables
{
"where": {
  "name": {
    "contains": "god"
  }
}
}

2. Advanced

  • Query
query Games($where: GamesWhereInput, $sort: GamesSortInput, $limit: Int, $offset: Int) {
  games(where: $where, sort: $sort, limit: $limit, offset: $offset) {
    id
    follows
    hypes
    name
    status
  }
}
  • Variables
{
  "where": {
    "AND": [
      {
        "follows": {
          "gt": 100
        },
        "hypes": {
          "gt": 100
        },
        "OR": [
          {
            "status": {
              "equals": null
            }
          }
        ]
      }
    ]
  },
  "sort": {
    "id": "asc"
  },
  "limit": 100,
  "offset": 10
}

3. Relations

  • Query
query Games {
  games {
    id
    follows
    hypes
    name
    status
    artworks {
      id
      url
      width
      height
    }
    cover {
      id
      url
      image_id
      width
      height
    }
  }
}