Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Core

Index

Type Aliases

FollowableResource<TGraph, TQuery>: FollowableLinks<TGraph> & Props<TGraph, TQuery> & FollowableEmbeds<TGraph, TQuery>

Constructs a resource record for given graph node and query.

Type Parameters

  • TGraph extends Core.Graph

  • TQuery extends Query<TGraph> | undefined = undefined

Resource<TGraph, TQuery>: Links<TGraph> & Props<TGraph, TQuery> & Embeds<TGraph, TQuery>

Constructs a resource record for given graph node and query.

Type Parameters

  • TGraph extends Core.Graph

  • TQuery extends Query<TGraph> | undefined = undefined

Functions

  • getResourceId(uri: string): string | number | null
  • Returns the last path segment, which is usually an ID. If it's a non-NaN numeric ID (true for most Foxy resources) then a number is returned. Otherwise returns a string or null if the path is empty.

    Parameters

    • uri: string

      self link on a resource, e.g. https://api.foxy.io/stores/123

    Returns string | number | null

    resource ID or null if not found

Generated using TypeDoc