# Recipe Swap Options

The `recipeSwapOptions` query includes the following two objects:

* **`onPlan.`** It retrieves other meals in the existing meal plan for the same `mealTime`.  Generate a meal plan first to have `onPlan` available recipes. For example, if you are swapping a lunch, this will retrieve all the other lunch options in the existing meal plan.
* **`similar`**. It retrieves all the recipes different than the original but **similar** in macros. If the user has too many restrictions, no recipes will be listed.

Use both in the [`recipeSwapOptions`](https://docs.suggestic.com/graphql/query/queries/recipes/recipe-swap-options) query.

## Arguments and fields

Define the same arguments and fields for bot objects.

### List of Arguments <a href="#list-of-fields" id="list-of-fields"></a>

<table data-header-hidden><thead><tr><th width="190.03178482541307" align="center">Argument Name</th><th width="150" align="center">Type</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center"><strong>Argument Name</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Description</strong></td></tr><tr><td align="center">size</td><td align="center">Int</td><td align="center"><p>Define the number of returned recipes. </p><p>If this parameter is not sent, the default number for <strong>similar</strong> recipes returned is 6 and for <strong>OnPlan</strong> recipes retrived 3</p></td></tr></tbody></table>

### List of Fields

| **Field Name** |                                  **Type**                                 |             **Description**             |
| :------------: | :-----------------------------------------------------------------------: | :-------------------------------------: |
|     Recipe     | [Recipe](https://docs.suggestic.com/graphql/objects/recipe/recipe-object) | Fields and details of the recipe object |

## Examples

### onPlan Example

{% tabs %}
{% tab title="Request" %}

```graphql
   onPlan (size:3) {
      id
      databaseId
      name
      mealTags
      serving
      numberOfServings
      
    }
```

{% endtab %}
{% endtabs %}

### similar Example

{% tabs %}
{% tab title="Request" %}

```graphql
  similar (size:10) {
      id
      databaseId
      name
      mealTags
      serving
      numberOfServings
    }
```

{% endtab %}
{% endtabs %}

### &#x20;<a href="#list-of-fields" id="list-of-fields"></a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/objects/recipe/recipe-swap-options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
