-
Notifications
You must be signed in to change notification settings - Fork 1
/
codegenSchema.ts
33 lines (30 loc) · 1.23 KB
/
codegenSchema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import multilingualDirective from './src/directives/multilingual';
import paginationDirective from './src/directives/pagination';
import fromFieldDirective from './src/directives/fromField';
import authCheckDirective from './src/directives/authСheck';
import adminCheckDirective from './src/directives/adminCheck';
import editorCheckDirective from './src/directives/editorCheck';
import dataLoaderDirective from './src/directives/dataloaders';
import createDirectiveDefault from '@codexteam/graphql-directive-default';
import globalIdResolver from './src/globalIdResolver';
import toGlobalIdDirective from './src/directives/toGlobalId';
import { makeExecutableSchema } from '@graphql-tools/schema';
import typeDefs from './src/typeDefs';
/**
* Export scheme for GraphQL Code Generator
*/
export default makeExecutableSchema({
typeDefs,
schemaTransforms: [
globalIdResolver,
toGlobalIdDirective('toGlobalId'),
paginationDirective('pagination'),
multilingualDirective('multilingual'),
fromFieldDirective('fromField'),
authCheckDirective('authCheck'),
adminCheckDirective('adminCheck'),
editorCheckDirective('editorCheck'),
dataLoaderDirective('dataLoader'),
createDirectiveDefault().schemaTransformer,
],
});