Adherence

Details about an item's Adherence Score

The adherence object contains details about an item's Adherence Score.

You may find this object in a recipe and in a menuitem.

List of Fields

Field

Type

Note

score

Float

Item's score. From 0 to 100.

color

adherenceColor

Possible values:

Blue, Yellow, Red, Green, Grey

icon

Icon

Possible Values: Cross, Unknown, Alert

title

String

General recommendation about the item

reason

String

List of matching rules that define the score

isRecommended

Boolean

False if the item falls outside of a user's program rules or personal preferences and restrictions

Considerations

  • A score of 0 can be caused by no match between a program's rules and the ingredients in the recipe or menu item. i.e. if a program has a single rule like "increase tomato" and the recipe has no tomato in it, then the item scores 0 for that program.

  • Meaning of colors

    • Green: high score, recommended item

    • Yellow: medium score, recommended item

    • Red: low score, not recommended item

    • Grey: not enough information to calculate a score

    • Blue: may contain ingredients not allowed by the program or the user's restrictions

  • Meaning of icons

    • Cross: associated with the color red. This item is not recommended.

    • Unknown: associated with the color blue. Not enough information to calculate a score.

    • Alert: associated with the color blue. May contain ingredients not allowed by the program or the user's restrictions.

Example

{
  recipe(id: "UmVjaXBlOmFmMDkzMjQ0LWZkZTMtNGE3Yy1iMTA4LWUxODExNTBkNmNiZQ==") {
    name
    author
    adherenceDetails {
      score
      color
      icon
      title
      reason
      isRecommended
    }
  }
}

Last updated