mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
29 lines
No EOL
427 B
JavaScript
29 lines
No EOL
427 B
JavaScript
import Telescope from 'meteor/nova:lib';
|
|
|
|
/**
|
|
* @summary Vote schema
|
|
* @type {SimpleSchema}
|
|
*/
|
|
Telescope.schemas.votes = new SimpleSchema({
|
|
itemId: {
|
|
type: String
|
|
},
|
|
power: {
|
|
type: Number,
|
|
optional: true
|
|
},
|
|
votedAt: {
|
|
type: Date,
|
|
optional: true
|
|
}
|
|
});
|
|
|
|
const voteSchema = `
|
|
type Vote {
|
|
itemId: String
|
|
power: Float
|
|
votedAt: String
|
|
}
|
|
`;
|
|
|
|
Telescope.graphQL.addSchema(voteSchema); |