NOTE: This repo is no longer under active development or maintenance. The project creates a GraphQL Apollo server from an IDL file.
-
Node.js 16
-
Python 3.10 or higher (for testing)
-
VSCode is recommended but not required
- Clone the repo.
- Change to the anchorgql directory by running
cd anchorgql. - Configure the settings in the
config.jsonfile in the src directory. - Run
npm start. This will generate the GraphQL project and start the GraphQL server for the IDL file.
The project includes a Python script (runLocal.py) which tests the project by generating projects for all the configured channels and then attempting to start them. The script prints the results detailing the projects where these steps succeeded and where they failed.
-
The test script will generate the config files for each channel when attempting to generate their projects. It pulls the config for various projects from the channels.json file. When running the test, it will attempt to download the IDL's from chain. Doing so requires a Solana identity setup on your testing machine. Running the script without the identity setup will run the tests without downloading the newest IDL's from chain.
-
The file has a config for testMode. In test mode, the server is stopped immediately after starting successfully. Set it to false if you want to keep the server running.