@automatonguy9311 If you don’t want any nasty surprises, always version your graphQL calls and upgrade every few months after testing all the API calls.
We use a wrapper similar to the following to ensure our calls are always versioned…
path/to/my-monday-sdk.js:
import mondaySdk from 'monday-sdk-js';
const MONDAY_SDK_VERSION = '2025-01';
/**
* optional `shortLivedToken`
*/
export const myMondaySdk = (shortLivedToken) => {
const monday = mondaySdk();
monday.setApiVersion(MONDAY_SDK_VERSION);
shortLivedToken && monday.setToken(shortLivedToken);
return monday;
};
We can then call monday sdk using…
import { myMondaySdk } from 'path/to/my-monday-sdk';
const monday = myMondaySdk();
const result = await monday.api(`{ me { name } }`);
// --> { "data": { "me": { "name": "David Simpson" } } }
This will (hopefully) prevent any nasty surprises when a current api version changes without you knowing.