- Description:
Fetch proofs using GraphQL queries
- Source:
Fetch proofs using GraphQL queries
Example
import { fetcher } from 'doipjs';
const data = await fetcher.graphql.fn({ url: 'https://domain.example/graphql/v2', query: '{ "query": "..." }' });
Members
(static, constant) timeout :number
- Description:
Default timeout after which the fetch is aborted
- Source:
- Default Value:
- 5000
Default timeout after which the fetch is aborted
Type:
- number
Methods
(static) fn(data, optsopt) → {Promise.<object>}
- Description:
Execute a GraphQL query via HTTP request
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object | Data used in the request Properties
|
|||||||||||||||||
opts |
module:types~VerificationConfig |
<optional> |
Options used to enable the request |
Returns:
The fetched GraphQL object
- Type
- Promise.<object>