Skip to content

cult-of-coders/meteor-graphql-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Meteor GraphQL Loader

Mission Make GraphQL easy to spread out around the app, so you can focus on propper concern separation.

Install

meteor add cultofcoders:graphql-loader

Usage

Simply merges types and resolvers, so you can have them split around your custom folder architecture. You can decide to import and load them all in one place, or around the apps.

import { getSchema, load } from 'meteor/cultofcoders:graphql-loader';

// spread around your app
load({
  typeDefs?: String | Array<String>,
  resolvers?: Object | Array<Object>
})

// load also accepts array
load([
  {...},
  {...}
])
// done near where you create the graphql loader
import { makeExecutableSchema } from 'graphql-tools';
const { typeDefs, resolvers } = getSchema();

const schema = makeExecutableSchema({
  typeDefs,
  resolvers
});

Using: https://github.com/okgrow/merge-graphql-schemas

About

Easily load GraphQL Schema in your Meteor app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published