This repository consists of two separate components: a GraphQL server for managing player data and a GitHub License client that queries license information for a specific key.
To run the GraphQL server:
-
Clone the repository:
git clone https://github.com/your-username/graphql-server.git
-
Navigate to the server directory:
cd graphql-server
-
Install dependencies:
go get -u github.com/graphql-go/graphql go get -u github.com/graphql-go/handler
-
Run the server:
go run main.go
The GraphQL server will be accessible at
http://localhost:8000/graphql
.
The server supports the following GraphQL query:
Retrieve information about all players:
query {
players {
id
name
highscore
isonline
location
levelsunlocked
}
}
The GraphQL schema defines a Player
object with fields like id
, name
, highscore
, isonline
, location
, and levelsunlocked
.
Contributions are welcome! Feel free to fork the repository and submit pull requests. Issues and feature requests are also appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.
To run the GitHub License client:
-
Clone the repository:
git clone https://github.com/amsem/graphql-apps.git
-
Navigate to the client directory:
cd graphql-apps
-
Install dependencies:
go get -u github.com/machinebox/graphql
-
Run the client:
go run main.go
The client queries GitHub License information for a specific key (e.g., "MIT").
Make sure to set your GitHub token as an environment variable:
export GITHUB_TOKEN=your-github-token
Contributions are welcome! Feel free to fork the repository and submit pull requests. Issues and feature requests are also appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.