mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-12-22 08:03:30 -06:00
PR-780243: Adding strict to types.
This commit is contained in:
@@ -6,17 +6,17 @@ import { getTest, addText } from '@controllerGraphQL';
|
||||
const resolvers = {
|
||||
Query: {
|
||||
// eslint-disable-next-line
|
||||
test: (rootValue, args, context) => ({}),
|
||||
test: (rootValue: any, args: any, context: any) => ({}),
|
||||
},
|
||||
Mutation: {
|
||||
// eslint-disable-next-line
|
||||
testMutation: (rootValue, args, context) => ({}),
|
||||
testMutation: (rootValue: any, args: any, context: any) => ({}),
|
||||
},
|
||||
Test: {
|
||||
test: (rootValue, args, context) => getTest({rootValue, args, context})
|
||||
test: (rootValue: any, args: any, context: any) => getTest({rootValue, args, context})
|
||||
},
|
||||
TestMutation: {
|
||||
testMutation: (rootValue, args, context) => addText({rootValue, args, context})
|
||||
testMutation: (rootValue: any, args: any, context: any) => addText({rootValue, args, context})
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { makeExecutableSchema } from '@graphql-tools/schema';
|
||||
import resolvers from'@GraphQL/resolvers';
|
||||
import Test from './Test.gql';
|
||||
import Test from '@GraphQL/schema/Test.gql';
|
||||
|
||||
// The GraphQL schema
|
||||
const rootTypes = `
|
||||
|
||||
@@ -21,8 +21,9 @@ server.use(
|
||||
|
||||
// DO NOT DO app.listen() unless we're testing this directly
|
||||
if (require.main === module) {
|
||||
server.listen((process.env.PORT || 4000), () => {
|
||||
console.log(`Iniciando Express en el puerto 4000${server.graphqlPath}`); /*${app.get('port')}*/
|
||||
const app = express();
|
||||
app.listen((process.env.PORT || 4000), () => {
|
||||
console.log(`Iniciando Express en el puerto 4000`); /*${app.get('port')}*/
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user