graphql-trello

0.0.3 • Public • Published

graphql-trello NPM version

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:

Readme

Keywords

Package Sidebar

Install

npm i graphql-trello

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

11.1 kB

Total Files

8

Last publish

Collaborators

  • lukehorvat