Skip to main content

Hey guys, I’m trying to use the following query to get all cards by paginating my info with the following line of code but I’m getting a Response 400 as a response, if I remove the “after: endCursor” part it works perfect for my first 50 cards - any suggestions? 

payload = "{\"query\":\"{ allCards(pipeId: 304500848, after: \"WyI4LjAiLCIzMzEuMCIsMTAxMTE3MjI1N10\") { edges { node { id title fields { name report_value updated_at value } } } pageInfo { endCursor } } }\"}"

 

Hi ​@AbelM! Could you try this one?

payload = "{\"query\":\"{ allCards(pipeId: 304500848, after: \\\"WyI4LjAiLCIzMzEuMCIsMTAxMTE3MjI1N10\\\") { edges { node { id title fields { name report_value updated_at value } } } pageInfo { endCursor } } }\"}"
 

I believe, the issue is related to how you are formatting the query string, specifically the escaping of quotes around the after value. Since you're nesting quotes within a JSON string, you need to escape them properly.


I guess you have to “double-escape” the quote containing the end cursor (ie, add `\\`  before it):

payload = "{\"query\":\"{ allCards(pipeId: 304500848, after: \\\"WyI4LjAiLCIzMzEuMCIsMTAxMTE3MjI1N10\\\") { edges { node { id title fields { name report_value updated_at value } } } pageInfo { endCursor } } }\"}"

 

PS: ops… ​@natalia-manffre  was faster 🏃


Reply