Skip to content

divporter/oneblink-graphql-node-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneBlink Graphql Node SDK

A graphql interface for @oneblink/sdk v1.0.0

Installation

npm i oneblink-graphql-sdk

Usage

The package exports a number of classes that can be used to access OneBlink Productivity Suite instances

Instance Functions

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
  }
}`);

Static functions

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
      }
    }
  }
}`);

OneBlink Node SDK

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"
    }
  }
})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published