File tree Expand file tree Collapse file tree 7 files changed +445
-160
lines changed
Expand file tree Collapse file tree 7 files changed +445
-160
lines changed Original file line number Diff line number Diff line change 4848 "@nestjs/passport" : " ^8.2.1" ,
4949 "@nestjs/platform-express" : " ^8.4.4" ,
5050 "@nestjs/serve-static" : " ^2.2.2" ,
51+ "@types/react-transition-group" : " ^4.4.4" ,
5152 "apollo-server-express" : " ^2.25.2" ,
5253 "bcrypt" : " ^5.0.1" ,
5354 "date-fns" : " ^2.28.0" ,
5657 "env-var" : " ^7.1.1" ,
5758 "graphql" : " ^15.8.0" ,
5859 "graphql-tools" : " ^8.2.3" ,
60+ "graphql-voyager" : " ^1.0.0-rc.31" ,
5961 "helmet" : " ^5.0.2" ,
6062 "module-alias" : " ^2.2.2" ,
6163 "mongodb" : " ^4.5.0" ,
118120 "@app" : " ./dist" ,
119121 "@" : " ./dist"
120122 }
121- }
123+ }
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ import { PORT } from '@config/env';
55import { NestExpressApplication } from '@nestjs/platform-express' ;
66import { join } from 'path' ;
77import helmet from 'helmet' ;
8+ import { express as voyagerMiddleware } from 'graphql-voyager/middleware' ;
89
910async function bootstrap ( ) {
1011 const app = await NestFactory . create < NestExpressApplication > ( AppModule ) ;
1112 app . setViewEngine ( 'ejs' ) ;
1213 app . setBaseViewsDir ( join ( __dirname , '..' , 'views' ) ) ;
1314 app . useStaticAssets ( join ( __dirname , '..' , 'public' ) ) ;
15+ app . use ( '/voyager' , voyagerMiddleware ( { endpointUrl : '/graphql' } ) ) ;
1416 app . use ( helmet ( ) ) ;
1517 await app . listen ( process . env . PORT ?? PORT ) ;
1618}
Original file line number Diff line number Diff line change 1010 "target" : " ES2019" ,
1111 "sourceMap" : true ,
1212 "outDir" : " ./dist" ,
13- "incremental" : true ,
13+ "incremental" : false ,
1414 "strict" : true ,
1515 "noUnusedLocals" : true ,
1616 "noUnusedParameters" : true ,
17+ "skipDefaultLibCheck" : true ,
1718 "baseUrl" : " src" ,
1819 "paths" : {
1920 "@modules/*" : [
Original file line number Diff line number Diff line change 1818 <div class =" card-body" >
1919 <h3 class =" card-title" >Organograma</h3 >
2020 <p class =" card-text" >Detalhes dos schemas e como eles se relacionam entre si. Também é possível visualizar as queries disponíveis.</p >
21- <a href =" /doc " class =" btn btn-primary" id =" organography-url" >Acessar organograma</a >
21+ <a href =" /voyager " class =" btn btn-primary" id =" organography-url" >Acessar organograma</a >
2222 </div >
2323 </div >
2424 </div >
3535
3636 </nav >
3737 </main >
38- <script >
39-
40- var organographyUrl = document .getElementById (' organography-url' );
41- var hostName = location .hostname ;
42- var url = organographyUrl .href ;
43-
44- function checkEnvironmentByHostName (hostName ) {
45- const result = Boolean (hostName === ' localhost' ) || Boolean (hostName === ' 127.0.0.1' );
46- return result;
47- }
48-
49- const isLocal = checkEnvironmentByHostName (hostName);
50-
51- if (isLocal){
52- organographyUrl .href = ` ${ url} /local` ;
53- } else {
54- organographyUrl .href = ` ${ url} /remote` ;
55- }
56-
57- </script >
5838</body >
5939</html >
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments