https://github.com/donaderoyan/go-graphql-api
https://github.com/donaderoyan/go-graphql-api
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/donaderoyan/go-graphql-api
- Owner: donaderoyan
- Created: 2019-08-14T11:32:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T12:33:42.000Z (almost 5 years ago)
- Last Synced: 2023-04-26T03:05:43.249Z (about 2 years ago)
- Language: Go
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### GraphQL Playground
Connect to http://localhost:8080
### Authentication : JWT
You need to set the Http request headers `Authorization`: `{JWT_token}`
## Usage
### Sign Up
```graphql
mutation {
signUp(
email: "[email protected]"
password: "12345678"
firstName: "graphql"
lastName: "go"
) {
ok
error
user {
id
firstName
lastName
bio
avatar
createdAt
updatedAt
}
}
}
```### Sign In
```graphql
mutation {
signIn(email: "[email protected]", password: "12345678") {
ok
error
token
}
}
```### Change a Password
```graphql
mutation {
changePassword(password: "87654321") {
ok
error
user {
id
firstName
lastName
bio
avatar
createdAt
updatedAt
}
}
}
```### Change a Profile
```graphql
mutation {
changeProfile(bio: "Go developer", avatar: "go-developer.png") {
ok
error
user {
id
firstName
lastName
bio
avatar
createdAt
updatedAt
}
}
}{"query":"mutation {changeProfile(bio:\"Go developer\" avatar: \"go-developer.png\") {ok error user {id email firstName lastName bio avatar createdAt updatedAt}}}"}
```### Get my profile
```graphql
query {
getMyProfile {
ok
error
user {
id
firstName
lastName
bio
avatar
createdAt
updatedAt
}
}
}
```