mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-06-20 04:48:24 -06:00
PR-018985: Actualizaciones de dependencias y configuraciones de GraphQL
This commit is contained in:
20
src/index.ts
20
src/index.ts
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import "reflect-metadata";
|
||||
import 'reflect-metadata';
|
||||
import ws from 'ws'; // yarn add ws
|
||||
import express from 'express'; //express
|
||||
import cors from 'cors';
|
||||
@ -35,15 +35,15 @@ app
|
||||
.use(apiRouter)//Routes de App
|
||||
.use('/graphql', GraphQLserver);//Server of Graphql
|
||||
|
||||
if(config.PLAYGROUND_GRAPHQL === true){
|
||||
app.get('/playground', expressPlayground({
|
||||
endpoint: '/graphql',
|
||||
subscriptionEndpoint: '/graphql',
|
||||
settings: {
|
||||
'request.credentials': 'include', //Include Credentials for playground
|
||||
},
|
||||
}));
|
||||
}
|
||||
if(config.PLAYGROUND_GRAPHQL === true){
|
||||
app.get('/playground', expressPlayground({
|
||||
endpoint: '/graphql',
|
||||
subscriptionEndpoint: '/graphql',
|
||||
settings: {
|
||||
'request.credentials': 'include', //Include Credentials for playground
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
// DO NOT DO app.listen() unless we're testing this directly
|
||||
if (require.main === module) {
|
||||
|
Reference in New Issue
Block a user