A Typescript GQL Client for IES
npm install @serodigital/ies-api-clientA Typescript GQL Client for IES
npm i @sero-digital/ies-api-client
``typescript
import { IESApiClient } from '@sero-digital/ies-api-client';
const client = new IESApiClient('graphqlApiUrl', {
type: 'client',
auth0Domain: 'https://auth0Domain',
auth0Audience: 'auth0Audience',
clientId: '12345',
clientSecret: 'tty12',
});
`
`typescript`
const client = new IESApiClient('graphqlApiUrl', {
type: 'jwt',
token: 'bearer token here',
});
`typescript``
const result = client.run
variables: {
...values,
},
fetchPolicy,
headers,
});
| Option | Required | Default |
| ----------- | -------- | ----------- |
| Document | true | N/A |
| Variables | false | {} |
| FetchPolicy | false | cache-first |
| Headers | false | undefined |