Skip to main content

Where can I find a simple authentication and query example for javascript? I can’t seem to find an example anywhere.


Something as simple as returning all of your boards…

Does this help?


I made a basic Node.js repo:


GitHub

Yes, thank you Ash for the response!


This is what I ended up with:


import { GraphQLClient } from 'graphql-request';

let getBoards = () => {
const client = new GraphQLClient(profile.monday_url, {
headers: {
Authorization: profile.monday_access_token,
},
})

const query = `{
boards() {
id
name
owner {
id
name
}
}
}`

client.request(query)
.then(data => {
setBoards(data.boards.map(board => {
return {
id: board.id,
name: board.name
}
}));
})
}
}

We now have an API tutorial for Javascript. Check it out here: API Javascript Quickstart