-
Notifications
You must be signed in to change notification settings - Fork 35
/
index.js
31 lines (27 loc) · 799 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import './checkNpm'
import SchemaTypes from './Auth'
import SchemaMutations from './Mutations'
import Mutation from './Mutation'
import LoginMethodResponse from './LoginMethodResponse'
import callMethod from './callMethod'
import {loadSchema} from 'graphql-loader'
const initAccounts = function (givenOptions) {
const defaultOptions = {
CreateUserProfileInput: 'name: String',
loginWithFacebook: false,
loginWithGoogle: false,
loginWithLinkedIn: false,
loginWithPassword: true
}
const options = {
...defaultOptions,
...givenOptions
}
const typeDefs = [SchemaTypes(options), ...SchemaMutations(options)]
const resolvers = {...Mutation(options), ...LoginMethodResponse(options)}
loadSchema({typeDefs, resolvers})
}
export {
callMethod,
initAccounts
}