mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
33 lines
822 B
JavaScript
33 lines
822 B
JavaScript
import Telescope from 'meteor/nova:lib';
|
|
import schema from './schema.js';
|
|
import mutations from './mutations.js';
|
|
import resolvers from './resolvers.js';
|
|
|
|
const Movies = Telescope.createCollection({
|
|
|
|
collectionName: 'movies',
|
|
|
|
typeName: 'Movie',
|
|
|
|
// a SimpleSchema-compatible JSON schema
|
|
schema,
|
|
|
|
/*
|
|
Three resolvers are expected:
|
|
- list (e.g.: moviesList(terms: JSON, offset: Int, limit: Int) )
|
|
- single (e.g.: moviesSingle(_id: String) )
|
|
- listTotal (e.g.: moviesTotal )
|
|
*/
|
|
resolvers,
|
|
|
|
/*
|
|
Three mutations are expected:
|
|
- new (e.g.: moviesNew(document: moviesInput) : Movie )
|
|
- edit (e.g.: moviesEdit(documentId: String, set: moviesInput, unset: moviesUnset) : Movie )
|
|
- remove (e.g.: moviesRemove(documentId: String) : Movie )
|
|
*/
|
|
mutations,
|
|
|
|
});
|
|
|
|
export default Movies;
|