Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivanaquino/graphqlmultipleauthstarter
Apollo GraphQL Starter Multiple Auth
https://github.com/ivanaquino/graphqlmultipleauthstarter
Last synced: 7 days ago
JSON representation
Apollo GraphQL Starter Multiple Auth
- Host: GitHub
- URL: https://github.com/ivanaquino/graphqlmultipleauthstarter
- Owner: IvanAquino
- Created: 2019-12-02T06:01:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T13:19:50.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T04:12:27.834Z (over 1 year ago)
- Language: JavaScript
- Size: 575 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graphql starter multiple type authentication
## Usage
```
docker-compose build
docker-compose up -d
```### Url
localhost:9001You can modify port in docker-compose.yaml file
## Mutations
#### Create user mutation
```
mutation createUser ($input: CreateUserRequest) {
createUser(input: $input) {
_id
name
}
}
```
#### Create user mutation variables```
{
"input": {
"name": "My name",
"email": "[email protected]",
"password": "asdasd"
}
}
```#### Create client mutation
```
mutation createClient ($input: CreateClientRequest) {
createClient (input: $input) {
_id
name
}
}
```
#### Create client mutation variables```
{
"input": {
"name": "My name",
"email": "[email protected]",
"password": "asdasd"
}
}
```#### Authenticate mutation
```
mutation authentication ($input: AuthenticationRequest) {
authenticate (input:$input) {
expiresIn
token
}
}
```#### Authenticate mutation variables for user
```
{
"input": {
"username": "[email protected]",
"password": "asdasd",
"type": "user"
}
}
```#### Authenticate mutation variables for client
```
{
"input": {
"username": "[email protected]",
"password": "asdasd",
"type": "client"
}
}
```