client/queries/foods/SearchFoods.graphql
query SearchFoods($searchTerm: String!) {
currentUser {
foods(input: { filter: { searchString: $searchTerm }, first: 15 }) {
edges {
cursor
node {
id
name
measurements {
edges {
node {
id
amount
measurement
calories
fat
carbs
protein
}
}
}
}
}
}
}
}