API reference

createIngredient

Required permission: RestaurantMenuWrite

graphql
createIngredient(
  restaurantId: ID!
  input: IngredientInput!
): Ingredient

Arguments

Name Type Description
restaurantId ID!
input IngredientInput!

Returns

Ingredient

Example

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