Solved

 How to get all fields (and custom columns from table) from a card

  • 18 August 2020
  • 2 replies
  • 1782 views

Userlevel 4


 [GraphQL] Hello Everyone.
 I want to take a card ID and get all the standard AND custom data that has relations with it, so i.e: Card ABC has: Assignee
 Due date
 Company (that's a custom table I have created and inside this table, there's a custom ID i need to use)
 Etc...
 I am having trouble to get these information because I think that it's a simple "Inner Join" solution but after seeing all the reference APIs I couldnt understand the relationship between the tables. Someone ever did something like it and could help? Thanks!

icon

Best answer by Roberto Chavarria 18 August 2020, 20:37

View original

2 replies

Userlevel 6
Badge +5

Hi there Thiago, hope all is well!

Our API is built on GraphQL, and it doesn’t accept SQL commands like Inner Joins or the likes.

Here is a query that can help you out with getting the value of the fields of the card you’ve inputted, and the value of the fields (along with the id and title of) the child cards that are connected to the card you’re searching from. If you need to look for the parent cards that are connected, simply replace the child_relations commando for parent_relations command.  

{
card(id:11111111){
fields{
value
}
child_relations{
source_type
cards{
id
title
fields{
name
value
}
}
}
}
}

You can think of this everything as a hierarchy of objects and their attributes, where the attributes are nested in each object. 

Você pode pesquisar por um card usando o find cards

{
findCards(
pipeId: 301145047
search: {
fieldId: "control_code"
fieldValue: "815890.2022-05-24.6.10.New"
}
) {
edges {
node {
id
title
}
}
}
}

 

 

 

Reply