Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-04-26 15:22:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
56440749bcf2d9b36560fb7461c11500f4109e76
56440749
1 parent
2b33510e
update GraphQL context
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
7 deletions
back/src/server.js
back/src/server.js
View file @
5644074
...
...
@@ -3,18 +3,12 @@ dotenv.config();
import
{
GraphQLServer
}
from
"graphql-yoga"
;
import
morgan
from
"morgan"
;
import
schema
from
"./schema"
;
import
{
prisma
}
from
"./utils"
;
const
PORT
=
process
.
env
.
PORT
;
const
server
=
new
GraphQLServer
({
schema
,
context
:
(
request
)
=>
{
return
{
...
request
,
prisma
,
};
},
context
:
({
request
})
=>
({
request
}),
});
server
.
express
.
use
(
morgan
(
"dev"
));
...
...
Please
register
or
login
to post a comment