From b54cd4a10e19733d770f93192d53cc8f4b8d4320 Mon Sep 17 00:00:00 2001 From: kiran94 Date: Sat, 28 May 2022 08:54:51 +0100 Subject: [PATCH] docs(readme): add --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..26f6fc8 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# go-voyager-graphql + +go-voyager-graphql is a small package that allows you to serve the [graphql-voyager](https://github.com/IvanGoncharov/graphql-voyager) graph from a HTTP Server. + +## Usage + +```go +// Create a new Handler, pass in your GraphQL Endpoint +vh := voyager.NewVoyagerHandler("/graphql") + +// Register the Handler +http.Handle("/voyager", vh) +``` + +Complete Sample can be found in [cmd/server/main.go](./cmd/server/main.go) + +## Local Setup + +Assuming you are at the root of the repo. + +```bash +make install_tools +make build +make test + +# Run the Server +# Navigate to http://localhost:8080/voyager +make run_server +```