Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilgooz/service-graphql
GraphQL service
https://github.com/ilgooz/service-graphql
mesg
Last synced: 25 days ago
JSON representation
GraphQL service
- Host: GitHub
- URL: https://github.com/ilgooz/service-graphql
- Owner: ilgooz
- License: other
- Created: 2019-02-20T10:56:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-08T10:48:46.000Z (over 4 years ago)
- Last Synced: 2024-08-03T20:01:05.170Z (3 months ago)
- Topics: mesg
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - GraphQL - GraphQL server (WWW)
README
# GraphQL service
# Contents
- [Installation](#Installation)
- [Definitions](#Definitions)
- [Events](#Events)
- [query](#query)
- [Tasks](#Tasks)
- [completeQuery](#completequery)# Installation
## MESG Core
This service requires [MESG Core](https://github.com/mesg-foundation/core) to be installed first.
You can install MESG Core by running the following command or [follow the installation guide](https://docs.mesg.com/guide/start-here/installation.html).
```bash
bash <(curl -fsSL https://mesg.com/install)
```## Service
Download the source code of this service, and then in the service's folder, run the following command:
```bash
mesg-core service deploy
```# Definitions
# Events
## query
Event key: `query`
Emitted for every graphql query request
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **fields** | `fields` | `Object` | Requested query fields |
| **sessionID** | `sessionID` | `String` | Unique ID of graphql query request |# Tasks
## completeQuery
Task key: `completeQuery`
### Inputs
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **data** | `data` | `Object` | Data to send as response to graphql query request |
| **sessionID** | `sessionID` | `String` | Unique ID of graphql query request |### Outputs
#### error
Output key: `error`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **message** | `message` | `String` | |#### success
Output key: `success`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **elapsedTime** | `elapsedTime` | `Number` | Elapsed time in nanoseconds for query request to complete |
| **sessionID** | `sessionID` | `String` | Session ID of graphql query request |