Skip to content

react-bootcamp/wines-api-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wines-api-graphql

The GraphQL version of the Wine api

available at https://wines-api-graphql.herokuapp.com/graphql

Try it

curl -X POST -H 'Content-Type: application/graphql' 'https://wines-api-graphql.herokuapp.com/graphql' -d '
  query WinesQuery {
    wines(first: 3) {
      name
      appellation {
        name
        region
      }
    }
  }
'

or just use the GraphiQL client here

Query Schema

{
  wine(id: String!) {
    id: String
    name: String
    type: String
    region: String
    grapes: [String]
    liked: Int
    commentsCount: Int
    image {
      url: String
    }
    appelation {
      name: String
      region: String
    }
    comments(first: Int?, last: Int?) {
      date: String
      title: String
      content: String
    }
  }
  region {
    id: String
    name: String
    wine(id: String!) {
      # see /wine
    }
    wines(first: Int?, last: Int?, ids: [String]?) {
      # see /wine
    }
  }
  regions(first: Int?, last: Int?, ids: [String]?) {
    # see /region
  }
  wines(first: Int?, last: Int?, ids: [String]?, fromRegions: [String]?) {
    # see /wine
  }
}

Releases

No releases published

Packages

No packages published