2016-11-03 21:39:09 +09:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
|
|
|
|
2016-10-31 16:19:37 +01:00
|
|
|
import { makeExecutableSchema } from 'graphql-tools';
|
2016-10-28 18:09:41 +02:00
|
|
|
|
2016-11-16 16:17:12 +01:00
|
|
|
import { meteorClientConfig, client } from './client.js';
|
2016-10-28 18:09:41 +02:00
|
|
|
|
|
|
|
import { createApolloServer } from './server.js';
|
2016-11-18 16:01:27 +09:00
|
|
|
import generateTypeDefs from './schema';
|
2016-11-03 21:39:09 +09:00
|
|
|
|
2016-11-18 16:01:27 +09:00
|
|
|
Meteor.startup(function () {
|
|
|
|
|
|
|
|
const typeDefs = generateTypeDefs();
|
|
|
|
|
|
|
|
Telescope.graphQL.finalSchema = typeDefs;
|
|
|
|
|
|
|
|
const schema = makeExecutableSchema({
|
|
|
|
typeDefs,
|
|
|
|
resolvers: Telescope.graphQL.resolvers,
|
|
|
|
});
|
2016-10-28 18:09:41 +02:00
|
|
|
|
2016-11-18 16:01:27 +09:00
|
|
|
createApolloServer({
|
|
|
|
schema,
|
|
|
|
});
|
2016-10-28 18:09:41 +02:00
|
|
|
});
|
|
|
|
|
2016-11-16 16:17:12 +01:00
|
|
|
export { meteorClientConfig, client };
|