Program Details

Retrieve all the details of a program

Use program to retrieve the details of a particular program based on its id.

Arguments

Arguments

Type

Description

id

ID

ID of the program. Use the programquery to get the ID of the desired program.

Available Fields

Field

Type

Note

id

ID

Id of the program

databaseId

String

databaseId of the program

name

String

Name of the program

author

String

Author of the program

comment

String

Notes about the author

descriptionShort

String

Short program description

descriptionLong

String

Full program description

isPremium

Bool

True if the program is categorized as Suggestic Premium

image

String

(URL) Book cover-style image for the program

cover

String

(URL) An image that can be used as a cover for the program

backgroundImage

String

(URL) An image that can be used as a background for the program

cpcsIngredientGroups

Object that contains the different rules (increase, decrease, and avoid) of the program

Examples

Get a specific program's detail

Obtaining a program's details by a given Id

{
  program(id: "UHJvZ3JhbTo0NjQ5Y2EzNi1jZTFmLTRmNGItYmU0Zi0yYWJmZDM3MWVjOTY=") {
    id
    databaseId
    name
    author
    comment
    descriptionShort
    descriptionLong
    image
    cover
    backgroundImage
    isPremium
  }
}

UI/UX example

In the same way, we have code examples, this is an implementation example in which see results of the API execution in the Suggestic App.

Get the Program's Rules

Obtaining the Balanced Diet program's rules (increase, decrease, and avoid) and their details.

{
  program(id: "UHJvZ3JhbTowYWQ0ZTc3YS04ZWRhLTRlOWItYWM4ZS0xYzg0YTJlOGJiNDI=") {
    name
     cpcsIngredientGroups {
      increase {
        name
        benefits
        description
        simpleExamples
      }
      decrease {
        name
        benefits
        description
        simpleExamples
      }
       avoid {
        name
        benefits
        description
        simpleExamples
      }
    }
  }
}

Last updated