Shopping List by Recipes

A shopping list in Suggestic is a collection of ingredients originating from recipes previously added to the list using the addToShoppingList mutation.

Use the shoppingList query to obtain the list of recipes added to the shopping list.

Available Fields

Field

Type

Note

ingredient

String

Item in the shopping list

quantity

String

Quantity of the ingredient (item)

floatQuantity

Float

Item quantity as float

String

Name of the aisle in which the ingredient (item) can be found. See options here.

recipeName

String

Name of the recipe

isDone

Boolean

True if the item is checked

Example

GraphQL Example

{
  shoppingList {
    edges {
      node {
        ingredientLine
        quantity
        aisleName
        recipeName
        isDone
        unit
        databaseId
      }
    }
  }
}

cURL Example

curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"query":"{  shoppingList { edges {node {ingredientLine quantity aisleName recipeName isDone unit  databaseId  errors   }  }  }}"}'

UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.

Get Shopping List Aggregate

Use shoppingListAggregate to obtain the ingredients for the recipe added to the shopping list. If more than one recipe is added to the shopping list, this will show the cumulative ingredients.

Available Fields

Field

Type

Note

ingredient

String

Item in the shopping list

quantity

String

Item (ingredient) quantity

aisleName

String

Name of the aisle in which the ingredient (item) can be found

unit

String

Unit of measurement. Possible Values: cup, spoon, ounces, teaspoon, tablespoon.

grams

Float

Recipe measurement. Use this value as a reference only.

isDone

Bool

True if the item is checked

Example

GraphQL Example

query {
  shoppingListAggregate {
    edges {
      node {
        databaseId
        ingredient
        aisleName
        quantity
        unit
        grams
        isDone
      }
    }
  }
}

cURL Example

curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"query":"{  shoppingListAggregate  { edges {node {databaseId ingredient aisleName quantity unit grams  isDone   }  }  }}"}'

UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.

Last updated