Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mondaydotcomorg/api

Package Overview
Dependencies
Maintainers
350
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mondaydotcomorg/api

monday.com API client

  • 0.3.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
decreased by-10.24%
Maintainers
350
Weekly downloads
 
Created
Source

Important

This will explain how to use our provided operations and their types to start working with the api For now, all the exported types will correspond to the 2024-04 version, with no regard to the version you specify

If you need a different version OR When you'l want to write your own TYPED queries, you have two options:

  1. If you aren't a monday app developer, use @mondaydotcomorg/setup-api
  2. If you are a monday app developer, use @mondaydotcomorg/apps-cli in your app root directory, and choose the api:generate option

Monday GraphQL JS SDK

This SDK provides you with an easy way to interact with monday.com's GraphQL API. The SDK is supported in both Node.js and browser environments, and is using the graphql-request client under the hood.

Installation

npm install @mondaydotcomorg/api

Usage

Using the api client

The package exports the class ApiClient which is the main entry point to the SDK. You can use it to query monday's API freestyle, or use the operations provided by the SDK.

import { ApiClient } from '@mondaydotcomorg/api';

const client = new ApiClient('<API-TOKEN>');

// or use the operations provided by the SDK
const me = await client.operations.getMeOp();

// Example how to change a text column
const changeTextColumn = await client.operations.changeColumnValueOp({
    boardId: "your_board_id",
    itemId: "your_item_id",
    columnId: "text",
    value: JSON.stringify("Hello, world!"),
});

// Example how to change a status column
const changeStatusColumn = await client.operations.changeColumnValueOp({
    boardId: "your_board_id",
    itemId: "your_item_id",
    columnId: "project_status", // replace with your column id
    value: JSON.stringify({ label: "Done" }),
});

// use the client to query monday's API freestyle WITHOUT TYPES -> Use @mondaydotcomorg/setup-api to setup typed project!
const boards = await client.query<{boards: [{ name: string }]}>(`query { boards(ids: some_id) { name } }`);

// You can also use the types provided by the sdk 
const { boards } = await client.query<{
  boards: [Board];
}>(`query { boards(ids: some_id) { name } }`);

Using the types

The package exports all the types used by the SDK, so you can use them in your code.

import { User } from '@mondaydotcomorg/api';

const user: User = {
    id: '123',
    name: 'John Doe',
    email: 'john.doe@someorg.com'
}

Keywords

FAQs

Package last updated on 28 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc