> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/objects/recipe/recipe-swap-options.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
