Forum Discussion

maddog0's avatar
maddog0
New Contributor II
3 years ago

GraphQL pagination

Does anyone else have experience with using pagination with GraphQL APIs?

I am working with a new endpoint that uses GraphQL but the limit and offseset parameters for it are kept in the body of the request which creates issues. I’ve figured out that I can use expressions to set the limit and offset in the body, but even when I set the pagination to a generic entity isn’t empty expression the first request will go through fine, but the second one will return an error stating the request has no body.

So I guess in the end I have 2 questions

  1. is there a way to ensure the pagination request resends the body of the request when sent through the HTTP client snap
  2. is there any better way to deal with graphQL API requests than writing a raw body in the HTTP client snap?

if it helps here is a screenshot of my current HTTP client snap setup

  • Kullay's avatar
    Kullay
    New Contributor III

    Hi dmiller,

    Thanks for update, still we are facing below issues, please help me on this.
    When we are using the as per the document format for attachement, we are not able to attached the file,

    2 Step: When we are used this file name <<TestingEmail.json>> Its getting the old file, not current file.

    Thanks,
    kullayappa

    • rohithmadhavan's avatar
      rohithmadhavan
      Employee

      @Kullay There’s a race condition in this pipeline design if the File Writer Snap is writing to TestingEmail.json. Since the File Writer and Email Sender Snaps are disconnected, their relative order of execution isn’t guaranteed. I would suggest connecting the File Writer’s output view to the Email Sender’s input view as shown below.