Skip to content

Commit

Permalink
docs(readme): add ref example to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Marton committed Jul 27, 2015
1 parent 9f83ff7 commit ff12c36
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ var UserSchema = new mongoose.Schema({
name: {
type: String
},
age: {
type: Number
}
friends: [{
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
}]
});

var User = mongoose.model('User', UserSchema);

var schema = getSchema([User]);

var query = `{
user {
users {
name
age
friends {
name
}
}
}`;

Expand Down

0 comments on commit ff12c36

Please sign in to comment.