Created
August 11, 2019 12:43
-
-
Save acomito/f7adb0a96e5b9c3b68eedae53f3dfb76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// // TOP LEVEL IMPORTS | |
import { merge } from 'lodash'; | |
import { gql } from 'apollo-server'; | |
// // User | |
import { QueryResolvers, QuerySchema } from './types/Query'; | |
import { MutationSchema, MutationResolvers } from './types/Mutation'; | |
import { UserProfileSchema, UserProfileResolvers } from './types/UserProfile'; | |
// using interefaces with each vendor's schema (caterer, venue, etc) will throw an error if one of the types is missing something form our Vendor interface... not exactly like classes/inheritance, but at least it will keep the sub-types in like with the Vendor type.... albeit not DRY | |
export const typeDefs = gql` | |
${QuerySchema} | |
${MutationSchema} | |
${UserProfileSchema} | |
`; | |
export const CustomResolvers = merge( | |
QueryResolvers, | |
MutationResolvers, | |
UserProfileResolvers | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment