Surgex v3.2.4 Surgex.Parser.IncludeParser View Source
Parses the JSON API’s include parameter according to the JSON API spec.
Produces a list of includes constrained to the provided relationship paths.
Link to this section Summary
Functions
Flattens the result of the parser (inclusion list) into multiple keys
Link to this section Functions
Flattens the result of the parser (inclusion list) into multiple keys.
Examples
iex> IncludeParser.flatten({:ok, include: [:user]}, :include)
{:ok, include_user: true}