mirror of
				https://github.com/aleleba/create-node-ts-graphql-server.git
				synced 2025-10-30 13:40:56 -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:
		
							
								
								
									
										13
									
								
								GraphQL/schema/Test.gql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								GraphQL/schema/Test.gql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| module.exports = ` | ||||
|  | ||||
|   """Test Query""" | ||||
|   type Test { | ||||
|     test: String | ||||
|   } | ||||
|  | ||||
|   """Esta es la Data de LogIn, Si los datos no son correctos devuelve el usuario Null y la conexion en False""" | ||||
|   type TestMutation { | ||||
|     testMutation(text: String): String | ||||
|   } | ||||
|    | ||||
| ` | ||||
							
								
								
									
										17
									
								
								GraphQL/schema/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								GraphQL/schema/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| import { makeExecutableSchema } from '@graphql-tools/schema'; | ||||
| import resolvers from'../resolvers'; | ||||
| import Test from './Test.gql'; | ||||
|  | ||||
| // The GraphQL schema | ||||
| const rootTypes = ` | ||||
|   type Query { | ||||
|     test: Test | ||||
|   } | ||||
|   type Mutation { | ||||
|       testMutation: TestMutation | ||||
|   } | ||||
| `; | ||||
|  | ||||
| const typeDefs = [ rootTypes, Test ]; | ||||
|  | ||||
| export default makeExecutableSchema({typeDefs, resolvers}); | ||||
		Reference in New Issue
	
	Block a user