Query
This query requires an API key scoped to your chain in the
Authorization header. You do not pass chain, widget, or session in the GraphQL query itself.Parameters
This query takes no arguments. Chain and widget context come from yourAuthorization header.
Response Types
WidgetDietaryPreference
WidgetAllergen
SmartMenuNutrientPreference
Example
Using Preferences in Search
Pass user-selected preferences to the search query:UI Recommendations
Diet Selector
Allergen Exclusion
Nutrient Range Sliders
Caching Filter Options
Unlike search results, filter options change infrequently. You may cache this response for a short period (e.g., 5 minutes) to reduce API calls during a session.Best Practices
Load Early
Fetch filter options when the user opens the menu, not when they click “Filter”.
Remember Preferences
Store user’s preferred filters locally and pre-populate on return visits.
Show Counts
After filtering, show how many dishes match (e.g., “12 Vegetarian dishes”).
Clear All Button
Provide an easy way to reset all filters.

