Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { gql } from 'apollo-boost'
- const RECIPE_ATTRIBUTES = gql`
- fragment recipeResults on Recipe {
- id
- title
- directions
- ingredients
- bylines {
- id
- title
- imageUrl
- }
- image {
- id
- title
- url
- }
- }
- `
- export const GET_RECIPE = gql`
- query Search($id: String!) {
- search(q: $id, brand: FOOD, types: RECIPE) {
- results {
- ...recipeResults
- }
- }
- }
- ${RECIPE_ATTRIBUTES}
- `
- export const GET_RECIPES = gql`
- query Search($searchInput: String!) {
- search(q: $searchInput, brand: FOOD, types: RECIPE, limit: 50) {
- count
- pageInfo {
- endCursor
- hasNextPage
- }
- results {
- ...recipeResults
- }
- }
- }
- ${RECIPE_ATTRIBUTES}
- `
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement