This repository contains the code to run the GraphQL server via Apollo Server
MTGJSON GraphQL is exactly what you would expect from the name, an open-source GraphQL API built on top of the MTGJSON data sets. This API focuses on the JSON payloads for MTGJSON.
This codebase is maintained by Milo Rue as a part of the greater MTGJSON team which can be found on the MTGJSON website.
If you would like to contribute to the development of this project please reach out on Discord or open a Pull request.
Report any bugs to issues to here
Basic Query
To get started from scratch quickly simply clone this repository and run the following:
npm install
npm run dev
Navigate to localhost:8000/graphql and you're set, documentation for Apollo, GraphQL, and NodeJS can be found here:
If you are looking to deploy this server anywhere you will need to run
npm run transpile:server
this will allow you to utilize npm start for whatever deployment solution you choose. The build should come with an updated /dist already setup
For most people there will be no need to download the codebase and run and host your own GraphQL server, the plans are to host this codebase at mtgjson.com/graphql or something similar.

