API reference

updateIngredient

Required permission: RestaurantMenuWrite

graphql
updateIngredient(
  restaurantId: ID!
  ingredientId: ID!
  patch: IngredientPatch!
): Ingredient

Arguments

Name Type Description
restaurantId ID!
ingredientId ID!
patch IngredientPatch!

Returns

Ingredient

Example

graphql
mutation UpdateIngredient($restaurantId: ID!, $ingredientId: ID!, $patch: IngredientPatch!) {
  updateIngredient(restaurantId: $restaurantId, ingredientId: $ingredientId, patch: $patch) {
    id
    nameEn
    nameSv
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { updateIngredient(...) { __typename } }"}'