A simple GraphQL server built with Go, utilizing the graphql-go/graphql
library to demonstrate basic GraphQL operations.
- Basic GraphQL Setup: Implements a simple GraphQL server with a
hello
query. - Minimal Dependencies: Built with Go's standard library and
graphql-go/graphql
. - Easy to Extend: A solid foundation for adding more complex GraphQL schemas and resolvers.
Ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/AshishNikam111000/graphql-golang-demo.git cd graphql-golang-demo
-
Install dependencies and run the server:
go mod tidy go run main.go
- Method - POST
- URL - localhost:3000/graphql
- Body - Select form body type and field name="query" and field value="{ hello }" (your query)