Http client for cloudpss APIs, use @cloudpss/fetch
for http requests.
import { HttpClient, GqlVariable } from '@cloudpss/http-client';
const client = new HttpClient({ token: 'xxx' });
const data = await client.gql.query`
model(rid: ${GqlVariable('model/cloudpss/example', 'ResourceID!')}) {
rid
name
description
jobs
configs
}`;
const model = data.data.model;
// Do something with model...