A graphql interface for @oneblink/sdk v1.0.0
npm i oneblink-graphql-sdk
The package exports a number of classes that can be used to access OneBlink Productivity Suite instances
To query traditional SDK instance functions you need an access key and secret key
import { Forms } from "oneblink-graphql-sdk";
const formsService = new Forms({ accessKey: "abc", secretKey: "xyz" });
formsService.query(`{
getForm(formId: 1){
id,
name,
description,
organisationId,
isMultiPage,
formsAppIds,
submissionEvents,
updatedAt
}
}`);
The static functions do not require an access key and secret key
import { Forms } from "oneblink-graphql-sdk";
Forms.query(`{
validateFormEvent(formElements: [], data:{type: "CALLBACK", configuration: {
url: "https://www.oneblink.io",
secret: "secret"
}
}){
... on CallbackSubmissionEvent {
type,
label
configuration {
url
}
}
}
}`);
The underlying instance and static methods are still available too, e.g.
import { Forms } from 'oneblink-graphql-sdk";
Forms.validateFormEvent(
[],
{
type: "CALLBACK",
configuration: {
url: "https://www.oneblink.io",
secret: "secret"
}
}
})