Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor into mixins + create search mixin pkg #11

Closed
matteodem opened this issue May 9, 2017 · 0 comments
Closed

Refactor into mixins + create search mixin pkg #11

matteodem opened this issue May 9, 2017 · 0 comments

Comments

@matteodem
Copy link
Owner

matteodem commented May 9, 2017

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

@matteodem matteodem changed the title Create search mixin package Refactor into mixins + create search mixin pkg May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant