# ink.igav.whatmealtodo.getSuggestions

> Published by [kaur.igav.ink](https://lexicon.garden/identity/did:plc:vd7yvfuocu3xr54lnszirlgz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vd7yvfuocu3xr54lnszirlgz/ink.igav.whatmealtodo.getSuggestions)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vd7yvfuocu3xr54lnszirlgz/ink.igav.whatmealtodo.getSuggestions/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vd7yvfuocu3xr54lnszirlgz/ink.igav.whatmealtodo.getSuggestions/examples)

## Definitions

### `ink.igav.whatmealtodo.getSuggestions`

**Type**: `query`

Recipes ranked by how much of them the caller's pantry already covers. The one query that needs both halves of this AppView: a network-wide public index, and one non-public repo. Neither source can answer it alone. Pantry items marked `kind: staple` are asymmetric here and callers should say so to their users: a staple counts towards a recipe that needs it, but never brings one up — candidates are drawn from held ingredients only, so a pantry of nothing but staples answers with nothing.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No |  |
| `cursor` | `string` | No |  |
| `maxMissing` | `integer` | No | Drop recipes missing more than this many ingredients. 0 is 'cook now' only. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `pantrySize` | `integer` | No | How many pantry items the ranking was computed against. An empty pantry produces an empty answer for a reason worth stating rather than leaving to look like no recipes matched. |
| `suggestions` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "ink.igav.whatmealtodo.getSuggestions",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "suggestions"
          ],
          "properties": {
            "cursor": {
              "type": "string"
            },
            "pantrySize": {
              "type": "integer",
              "minimum": 0,
              "description": "How many pantry items the ranking was computed against. An empty pantry produces an empty answer for a reason worth stating rather than leaving to look like no recipes matched."
            },
            "suggestions": {
              "type": "array",
              "items": {
                "ref": "ink.igav.whatmealtodo.defs#suggestion",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 25,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string"
          },
          "maxMissing": {
            "type": "integer",
            "default": 2,
            "maximum": 10,
            "minimum": 0,
            "description": "Drop recipes missing more than this many ingredients. 0 is 'cook now' only."
          }
        }
      },
      "description": "Recipes ranked by how much of them the caller's pantry already covers. The one query that needs both halves of this AppView: a network-wide public index, and one non-public repo. Neither source can answer it alone. Pantry items marked `kind: staple` are asymmetric here and callers should say so to their users: a staple counts towards a recipe that needs it, but never brings one up — candidates are drawn from held ingredients only, so a pantry of nothing but staples answers with nothing."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
