Solved

Query

  • 31 March 2022
  • 4 replies
  • 211 views

Userlevel 2

Hello, I need to use APi to pull the phase of the card, or rather its name, gives the following error:
No query string was present

What exactly do I need to enter for the call to be correct?
Using this Body:

query {
  card(id: 513360781) {
    title
   current_phase {
     name
   }
    id
    updated_at
  }
}

icon

Best answer by Lucas Democh 5 April 2022, 00:04

View original

4 replies

Userlevel 6
Badge +5

I tried running this query and it worked. Try again putting "" in your query like below:

 

query {
  card(id: “513360781”) {
    title
   current_phase {
     name
   }
    id
    updated_at
  }
}

Userlevel 2

I tried running this query and it worked. Try again putting "" in your query like below:

 

query {
  card(id: “513360781”) {
    title
   current_phase {
     name
   }
    id
    updated_at
  }
}

Hello.
When I make a call through the Api, I get an error like this, and nothing helps.
 

 

Userlevel 6
Badge +5

It is very strange because the code is correct, I tested it in graphiql and it works perfectly. Have you tried to verify that the problem is not with the card? Maybe the card has been deleted or its user doesn't have access to it…

 

See:

 

Userlevel 7
Badge +15

Hello @ggmeyd 

 

It is important to remember that the query will only return when you have access to the queried Pipe.

In the case of querying a specific card, we usually use a query to indicate in which Pipe that card needs to be searched.

I'm not sure about this, but I believe card IDs can repeat themselves when looking at many different organizations.

 

Try querying like this:


  pipe(id: XXXXXXXX) {
    id
  }
  
  
  card (id: "XXXXXXXX") {
  title
  current_phase {
     name
  }

  }}

This way you guarantee that you are consulting the correct Pipe.

Reply