@cloud-obs/yoga
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Cloud-Obs SDK for Yoga

GitHub license npm version

Getting Started

First, you need to visit cloud-obs.com, add your company to the system and create a new project where all dashboards and analytics will be displayed. After that you can create a new Access Token that will be used by the SDK to establish TCP connection with Cloud-Obs SDK API back-end.

Second, you need to install the SDK into your project.

yarn add @cloud-obs/yoga

npm i --save @cloud-obs/yoga

Now, in your yoga server file you just need to import the useCloudObsEnvelop function.

import { useCloudObsEnvelop } from '@cloud-obs/yoga'

This function will return an Envelop plugin for the Yoga server. Please pass the Access Token as a parameter for this function. Here is an example:

// Create a Yoga instance with a GraphQL schema.
const yoga = createYoga({ 
  schema, 
  plugins: [
    useCloudObsEnvelop('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')
  ]
})

Examples

Please feel free to navigate to the examples directory for yoga.

Readme

Keywords

none

Package Sidebar

Install

npm i @cloud-obs/yoga

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

9.54 kB

Total Files

6

Last publish

Collaborators

  • ddoronin