freight v0.2.0 Freight.Payload.SuccessPayload

Success payloads are payloads that are created when an :ok tuple has been returned.

Their successful property is always set to true.

Link to this section Summary

Functions

Manually generates a map representing a successful object

Link to this section Functions

Link to this function create_payload(list)

Manually generates a map representing a successful object.

Omitted value will be returned as null in your graphql response. There is currently no checking for whether all values are provided.

Usage

    create_payload(user: %User{})

will return the following map

  %{
    successful: true,
    user: %User{}
  }