baublet/w8mngr

View on GitHub
client/queries/foods/GetFoodDetails.graphql

Summary

Maintainability
Test Coverage
query GetFoodDetails($id: ID!) {
  currentUser {
    foods(input: { filter: { id: $id }, last: 1 }) {
      edges {
        node {
          id
          name
          description
          measurements {
            edges {
              node {
                id
                amount
                measurement
                calories
                fat
                carbs
                protein
              }
            }
          }
          image {
            id
            publicId
            preview: publicUrl(input: { type: PREVIEW })
            small: publicUrl(input: { type: MEDIUM_SQUARE })
          }
        }
      }
    }
  }
}