@inrupt/solid-client-access-grants
    Preparing search index...

    Function query

    • Query for Access Credential (Access Requests, Access Grants or Access Denials) based on a given filter, and get a page of results.

      Parameters

      • filter: AccessGrantFilter | AccessRequestFilter

        The query filter

      • options: {
            fetch: {
                (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
                (input: string | URL | Request, init?: RequestInit): Promise<Response>;
            };
            queryEndpoint: URL;
        }

        Query options

        • fetch: {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          }
        • queryEndpoint: URL

      Returns Promise<CredentialResult>

      a paginated set of Access Credentials matching the given filter

      3.2.0

       // Get the first results page.
      const activeGrantsWithinDay = await query(
      {
      type: "SolidAccessGrant",
      status: "Active",
      issuedWithin: DURATION.ONE_DAY,
      },
      {
      fetch: session.fetch,
      queryEndpoint: config.queryEndpoint,
      },
      );
      // Get the next results page.
      const activeGrantsWithinDay2 = await query(
      activeGrantsWithinDay.next,
      {
      fetch: session.fetch,
      queryEndpoint: config.queryEndpoint,
      },
      );