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-08-29 15:15:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6e8a674bc0d6c447b5669c87b00e95dd07424a89
6e8a674b
1 parent
1e71e9a0
update new schema package
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
back/src/schema.js
back/src/schema.js
View file @
6e8a674
import
path
from
"path"
;
import
{
makeExecutableSchema
}
from
"graphql-tools"
;
import
{
fileLoader
,
mergeResolvers
,
mergeTypes
}
from
"merge-graphql-schemas"
;
import
{
makeExecutableSchema
}
from
"@graphql-tools/schema"
;
import
{
mergeTypeDefs
,
mergeResolvers
}
from
"@graphql-tools/merge"
;
import
{
loadFilesSync
}
from
"@graphql-tools/load-files"
;
const
allTypes
=
fileLoader
(
path
.
join
(
__dirname
,
"api/**/*.graphql"
));
const
allResolvers
=
fileLoader
(
path
.
join
(
__dirname
,
"api/**/*.js"
));
const
allTypes
=
loadFilesSync
(
path
.
join
(
__dirname
,
"api/**/*.graphql"
));
const
allResolvers
=
loadFilesSync
(
path
.
join
(
__dirname
,
"api/**/*.js"
));
const
schema
=
makeExecutableSchema
({
typeDefs
:
mergeTypes
(
allTypes
),
typeDefs
:
mergeType
Def
s
(
allTypes
),
resolvers
:
mergeResolvers
(
allResolvers
),
});
...
...
Please
register
or
login
to post a comment