graphql-trello
v0.0.3
Published
GraphQL interface to Trello's API.
Downloads
9
Readme
graphql-trello
GraphQL interface to Trello's API.
Installation
Install the package with NPM:
$ npm install graphql-trello
Usage
Example:
import graphqlTrello from "graphql-trello";
let query = `
query($boardId: String!) {
getBoard(boardId: $boardId) {
id
name
lists {
id
name
cards {
id
name
comments {
id
content
}
}
}
members {
id
username
}
}
}
`;
graphqlTrello({
query,
variables: { boardId: "TRELLO_BOARD_ID" },
key: "TRELLO_KEY",
token: "TRELLO_TOKEN",
}).then(data => {
let board = data.getBoard;
console.log(board);
}).catch(error => {
console.error(error);
});
See the examples directory for more!
Related
Check out my other Trello packages: