mirror of
				https://github.com/aleleba/create-node-ts-graphql-server.git
				synced 2025-10-30 21:51:13 -06:00 
			
		
		
		
	PR-448199:
Adding files from first version. Creating GraphQL server with their controllers and their models, squema and resolvers. Adding support to webpack and typescript.
This commit is contained in:
		
							
								
								
									
										23
									
								
								GraphQL/resolvers/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								GraphQL/resolvers/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| import { getTest, addText } from '../../controllers/controllerGraphQL'; | ||||
|  | ||||
| // A map of functions which return data for the schema. | ||||
| const resolvers = { | ||||
| 	Query: { | ||||
| 		// eslint-disable-next-line | ||||
| 		test: (rootValue, args, context) => ({}), | ||||
| 	}, | ||||
| 	Mutation: { | ||||
| 		// eslint-disable-next-line | ||||
| 		testMutation: (rootValue, args, context) => ({}), | ||||
| 	}, | ||||
| 	Test: { | ||||
| 		test: (rootValue, args, context) => getTest(rootValue, args, context) | ||||
| 	}, | ||||
| 	TestMutation: { | ||||
| 		testMutation: (rootValue, args, context) => addText(rootValue, args, context) | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| export default resolvers; | ||||
		Reference in New Issue
	
	Block a user