Skip to content

Pass in a custom fetching function rather than a URL #23

Closed

Description

@AleksandrHovhannisyan

Howdy! I think it would be really nice if I could pass in a function that fetches my data from the target URL, rather than passing in the URL directly. For my use case specifically, I want to pull in data from the GitHub API at build time using their Octokit helper library. It's definitely possible to make requests by hand by assembling a request URL, but it's not as ergonomic (plus, Octokit allows you to aggregate paginated calls without needing to do this yourself). Is this something this plugin could accommodate? Maybe it would just need to accept a user-supplied key for caching since it's no longer getting a URL directly.

Activity

  1. carbontwelve commented on Sep 6, 2022

    @carbontwelve

    I think implementing this would provide a solution to #2.

  2. added
    enhancement
    on Mar 17, 2023
  3. added 2 commits that reference this issue on Jul 10, 2023
  4. added a commit that references this issue on Mar 9, 2024
  5. zachleat commented on Oct 22, 2024

    @zachleat
    Member

    Merged #32—thank you @doug-wade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions