Skip to main content
Solved

Query


ggmeyd

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
  }
}

Best answer by Lucas Democh

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.

View original
Did this topic help you find an answer to your question?

4 replies

alicereis
Forum|alt.badge.img+5
  • Regular Participant
  • 59 replies
  • March 31, 2022

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
  }
}


ggmeyd
  • Author
  • New Member
  • 1 reply
  • April 1, 2022
alicereis wrote:

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.
 

 


alicereis
Forum|alt.badge.img+5
  • Regular Participant
  • 59 replies
  • April 1, 2022

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:

 


Lucas Democh
Forum|alt.badge.img+15
  • Pipefy Legend
  • 396 replies
  • Answer
  • April 4, 2022

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings