View Source Bonfire.Common.Pointers (bonfire_umbrella v0.3.6-classic-beta.7)

Link to this section Summary

Link to this section Functions

Batch loading of associations for GraphQL API

Link to this function

exists?(filters, opts \\ [])

View Source
Link to this function

filters(schema, id_filters, opts \\ [])

View Source
Link to this function

follow!(pointer_or_pointers, opts \\ [])

View Source
Link to this function

follow_function_error(error, args)

View Source
@spec forge!(%{__struct__: atom(), id: binary()}) :: %Pointers.Pointer{
  __meta__: term(),
  activities: term(),
  activity: term(),
  actor: term(),
  boost_count: term(),
  care_closure: term(),
  caretaker: term(),
  category: term(),
  character: term(),
  circle: term(),
  controlled: term(),
  created: term(),
  deleted_at: term(),
  direct_replies: term(),
  dummy: term(),
  edge: term(),
  encircle_subjects: term(),
  extra_info: term(),
  feed_publishes: term(),
  files: term(),
  follow_count: term(),
  geolocation: term(),
  id: term(),
  like_count: term(),
  media: term(),
  message: term(),
  named: term(),
  peered: term(),
  permitted: term(),
  pointed: term(),
  post: term(),
  post_content: term(),
  profile: term(),
  replied: term(),
  stereotyped: term(),
  table: term(),
  table_id: term(),
  tagged: term(),
  tags: term(),
  user: term()
}

Forge a pointer from a pointable object

Does not hit the database.

Is safe so long as the provided struct participates in the meta abstraction.

@spec forge!(table_id :: integer() | atom(), id :: binary()) :: %Pointers.Pointer{
  __meta__: term(),
  activities: term(),
  activity: term(),
  actor: term(),
  boost_count: term(),
  care_closure: term(),
  caretaker: term(),
  category: term(),
  character: term(),
  circle: term(),
  controlled: term(),
  created: term(),
  deleted_at: term(),
  direct_replies: term(),
  dummy: term(),
  edge: term(),
  encircle_subjects: term(),
  extra_info: term(),
  feed_publishes: term(),
  files: term(),
  follow_count: term(),
  geolocation: term(),
  id: term(),
  like_count: term(),
  media: term(),
  message: term(),
  named: term(),
  peered: term(),
  permitted: term(),
  pointed: term(),
  post: term(),
  post_content: term(),
  profile: term(),
  replied: term(),
  stereotyped: term(),
  table: term(),
  table_id: term(),
  tagged: term(),
  tags: term(),
  user: term()
}

Forges a pointer to a participating meta entity.

Does not hit the database, is safe so long as the entry we wish to synthesise a pointer for represents a legitimate entry in the database.

Link to this function

many!(filters \\ [], opts \\ [])

View Source
Link to this function

many(filters \\ [], opts \\ [])

View Source

Turns a thing into a pointer if it is not already. Errors if it cannot be performed

Turns a thing into a pointer if it is not already or returns nil

Link to this function

one!(filters, opts \\ [])

View Source
Link to this function

pointer_preloads(query, preloads)

View Source
Link to this function

pointer_query(filters, opts)

View Source
Link to this function

preload!(pointer_or_pointers, opts \\ [])

View Source
@spec preload!(Pointers.Pointer.t() | [Pointers.Pointer.t()], list()) ::
  Pointers.Pointer.t() | [Pointers.Pointer.t()]

Follows one or more pointers and adds the pointed records to the pointed attrs

Link to this function

query(schema, filters, opts \\ [])

View Source