Pagination: Fetch Star Wars data with GraphQL

The following example pipeline demonstrates the pagination functionality of the GraphQL Client Snap.



Download this Pipeline

  1. Configure the GraphQL Client Snap with https://swapi-graphql.eskerda.vercel.app/ URL that points to a GraphQL API for the Star Wars API, (commonly known as SWAPI).
  2. Specify the following query for Pagination:


  3. Set the pagination properties. The snap is configured to handle pagination using cursor-based navigation.


  4. Validate the pipeline. On validating, the Snap processes the GraphQL query to the SWAPI endpoint. It retrieves data for 5 characters at a time, including their names, birth years, and species details.


To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.