View Code? Open in Web Editor
NEW
Make your meteor mongo collections accessible over a graphql endpoint
Home Page: https://atmospherejs.com/easy/graphqlizer
License: GNU Affero General Public License v3.0
graphqlizer's Introduction
graphqlizer's People
graphqlizer's Issues
Allow to pass mixins (or some other naming) to extend graphqlize resolvers and type defs. Also refactor CRUD to be mixins (one for create, one for read etc).
Make the search mixin a separate package and provide some simple default mongo search query.
import { createCollectionSchema } from 'meteor/easy:graphqlizer'
import { searchMixin } from 'meteor/graphqlizer:search'
createCollectionSchema ( {
type : 'Alien' ,
collection : AlienCollection ,
schema : AlienSimpleSchema ,
mixins : [ searchMixin ] ,
} )
const createMixin = {
Mutation : {
} ,
typeDefs : `
extend type Mutation {
...
}
`
}
Verify if the config structure still makes sense with mixins. Probably deprecate crud
config
Something like
import moment from 'moment'
import { registerType } from 'meteor/easy:graphqlizer'
registerType ( Date , {
type : 'Date' ,
resolve : field => moment ( field ) ,
} )
This allows to define custom types that map a simple schema type to a graphql type.
Describe how to customize input / type fields for graphql resolvers + type defs
Describe how to run code before and after any CRUD operation
Describe how relationships between types can be handled
Create test for generateTypeDefsAndResolvers
method
Use in own apps
How to instantiate empty initial Query and Mutation?
Describe using the context + filters for more granular business logic