Skip to content

ashudson23/xivapi-apollo-server

Repository files navigation

xivapi-apollo-server

license

This is an apollo server layer for interacting with XIVAPI and requesting data using GraphQL.

How to run

Run server in development

npm i
npm run start

Open http://localhost:8080 to use GraphQL's playground.

Example to fetch free company
query {
  freecompany(name: "power xiv", server: "phoenix") {
    Results {
      ID
      Name
    }
  }
}
Example to fetch character
query {
  character(name: "bordeaux", page: 2) {
    Pagination {
      Page
      PageTotal
    }
    Results {
      ID
      Name
      Server
    }
  }
}

Caching

There is currently a default internal cache that will cache data (for 1 hour) for /character/search and /freecompany/search endpoints (the only 2 supported enpoints, at the moment).

License

This project is open source, under the terms described in the MIT License.

About

An apollo (GraphQL) server layer for xivapi.com

Resources

Stars

Watchers

Forks

Packages

No packages published