https://github.com/danielsharkov/gohttpsgraphy
This is just a testing project for Golang using with TSL and GraphQL.
https://github.com/danielsharkov/gohttpsgraphy
Last synced: 3 months ago
JSON representation
This is just a testing project for Golang using with TSL and GraphQL.
- Host: GitHub
- URL: https://github.com/danielsharkov/gohttpsgraphy
- Owner: DanielSharkov
- License: unlicense
- Created: 2018-04-11T21:39:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-19T10:43:09.000Z (about 7 years ago)
- Last Synced: 2025-01-16T01:28:09.861Z (4 months ago)
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoHttpsGraphy
Golang web API using TSL and GraphQL---
## Generate certificate
To actually have a HTTPS connection you need a private and a public key, this example of creating a public key is **only for testing** and **mustn't be used in production.** [More about...](https://www.globalsign.com/en/ssl-information-center/what-is-an-ssl-certificate/)
To generate a public key, run this in your console and in the same directory as your project is in, then type for **`[host]`** your address (without brackets).
For example just use **`--host=localhost`**
```
go run $GOROOT/src/crypto/tls/generate_cert.go --host=[host]
```Remember the file **`key.pem`** is the private key and **`cert.pem`** is your public key.
## GraphQL
To use GraphQL, use a GraphQL playground ([like this one](https://github.com/graphcool/graphql-playground)) and feel free to query.```
query {
users {
id
name {first last}
}
user(id: 1) {
name {first last}
birthdate {month day year}
gender
phone
jobs
created
edited
}
}
```URL requests like `/graph?query={}` will be supported soon...
### ToGetDone list:
* [x] Implement GraphQL
* [ ] Support HTTPS _(Currently not working cause of issues with certificate)_
* [ ] Finish GraphQL examples
* [ ] Support GraphQL URL query_Description follows..._