Added GraphQL & On-Chain as objects supported

This commit is contained in:
Anamaria Loznianu 2022-10-04 14:26:15 +03:00
parent 05dd28906e
commit 2dcc7eb9b8
1 changed files with 57 additions and 22 deletions

View File

@ -219,39 +219,74 @@ During the publish process, file URLs must be encrypted with a respective _Provi
where "files" contains one or more storage objects.
Type of objects supported :
**Type of objects supported:**
| Type | Description | Example |
| ----- | ---------------------------------------- | ----------------------------------------------------------------- |
| `url` | Static URL. Contains url and HTTP method | <pre class="language-json"><code class="lang-json">[</code></pre> |
| { | | |
***`URL`***
Static URL. Contains url and HTTP method.
```
"type": "url",
"url": "https://url.com/file1.csv",
"method": "GET",
"headers":
[
{"Authorization": "Bearer 123"},
{"APIKEY": "124"},
]
{
"type": "url",
"url": "https://url.com/file1.csv",
"method": "GET",
"headers":
[
{"Authorization": "Bearer 123"},
{"APIKEY": "124"},
]
}
```
} ] |
First class integrations supported in the future :
***`IPFS`***
| Type | Description | Example |
| ------ | ----------- | ----------------------------------------------------------------- |
| `ipfs` | IPFS files | <pre class="language-json"><code class="lang-json">[</code></pre> |
| { | | |
IPFS files.
```
"type": "ipfs",
"hash": "XXX"
{
"type": "ipfs",
"hash": "XXX"
}
```
} ] | | `filecoin` | Filecoin storage | | | `arwave` | Arwave | | | `storj` | Storj | | | `sql` | Sql connection, dataset is generated by a query | |
***`GraphQL`***
Use GraphQL querys as datasource.
```
{
"type": "graphql",
"url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph",
"query": """
query{
nfts(orderBy: createdTimestamp,orderDirection:desc){
id
symbol
createdTimestamp
}
}
"""
}
```
***`On-Chain`***
Use a smart contract as datasource.
```
{
"type": "smartcontract",
"address": "0x8149276f275EEFAc110D74AFE8AFECEaeC7d1593",
"abi": {
"inputs": [],
"name": "swapOceanFee",
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
"stateMutability": "view",
"type": "function",
}
}
```
A service can contain multiple files, using multiple storage types.