PR-780243: Adding strict to types.

This commit is contained in:
2023-03-06 22:37:37 +00:00
parent 4881de8667
commit f70d03de84
10 changed files with 280 additions and 17 deletions

View File

@@ -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})
}
};

View File

@@ -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 = `

View File

@@ -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')}*/
});
}