Skip to content

MoonHighway/moonhighway-cloud

Repository files navigation

Sample Cloud

A sample cloud of examples built on Apollo Federation.

MH Cloud Diagram

Test Operations for the Hue Review

Create an Account or Login

# Create or Authorize a User

mutation authorize($email: String!, $password: String!) {
  authorize(email: $email, password: $password) {
    token
    user {
      name
    }
  }
}

mutation create($create: CreateUserForm!) {
  createAccount(input: $create) {
    token
    user {
      email
      name
    }
  }
}

Query Variables

{
  "email": "[email protected]",
  "password": "badPassword",
  "create": {
    "email": "[email protected]",
    "name": "Jungle Cat",
    "password": "badPassword"
  }
}

Check you User Info

query myInfo {
  me {
    email
    name
    postedColors {
      id
      title
      value
      reviews {
        advRating
        reviews {
          rating
          comment
        }
      }
    }
  }
}

Http Headers

{
  "authorization": "Bearer <TOKEN>"
}

Add Some Colors

mutation add($title: String!, $value: String!) {
  addColor(title: $title, value: $value) {
    id
    title
    createdBy {
      email
      name
    }
  }
}
{
  "title": "Grand",
  "value": "#00FF00"
}

List Some Colors

query allColors {
  allColors {
    id
    title
    value
    createdBy {
      name
    }
    reviews {
      advRating
      yourReview {
        rating
        comment
      }
      reviews {
        rating
        comment
      }
    }
  }
}

Rate a Color a Color

mutation rateColor($input: ReviewForm!) {
  addReview(input: $input) {
    id
    rating
    comment
    color {
      title
      value
    }
    user {
      email
      name
    }
  }
}

Query Variables

{
  "input": {
    "itemID": "O6z9tliSS",
    "rating": 2,
    "comment": "This color isn't beautiful"
  }
}

Test Operations for Rowdy

Create an Account or Login

Check your User Info

Add some photos

List Some photos

Review a Photo

Check the Reviews

About

A fake cloud for a real company.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •