Skip to content

Commit

Permalink
Add foodLogs query to retrieve food logs by user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
marksikaundi committed Mar 11, 2024
1 parent 8eca903 commit 46d8a85
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/postgresql/index.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ type Query {
table: "food_log"
configuration: "postgresql_config"
)

foodLogs(user_id: String!): [Food_log]
@dbquery(
type: "postgresql"
schema: "public"
table: "food_log"
configuration: "postgresql_config"
)

food_logByFood_idAndLabel(food_id: String!, label: String!): [Food_log]
@dbquery(
type: "postgresql"
Expand Down Expand Up @@ -71,7 +80,6 @@ type Mutation {
food_id: String
kcal: Int
user_id: String
created_at: DateTime
): Food_log
@dbquery(
type: "postgresql"
Expand Down

0 comments on commit 46d8a85

Please sign in to comment.