Remove potentially unused code

This commit is contained in:
roschaefer 2019-11-14 12:56:00 +01:00
parent 98eea7d711
commit 864f9db753
3 changed files with 42 additions and 73 deletions

View File

@ -1,12 +0,0 @@
import {
GraphQLLowerCaseDirective,
GraphQLTrimDirective,
GraphQLDefaultToDirective,
} from 'graphql-custom-directives'
export default function applyDirectives(augmentedSchema) {
const directives = [GraphQLLowerCaseDirective, GraphQLTrimDirective, GraphQLDefaultToDirective]
augmentedSchema._directives.push.apply(augmentedSchema._directives, directives)
return augmentedSchema
}

View File

@ -1,9 +0,0 @@
import { GraphQLDate, GraphQLTime, GraphQLDateTime } from 'graphql-iso-date'
export default function applyScalars(augmentedSchema) {
augmentedSchema._typeMap.Date = GraphQLDate
augmentedSchema._typeMap.Time = GraphQLTime
augmentedSchema._typeMap.DateTime = GraphQLDateTime
return augmentedSchema
}

View File

@ -1,56 +1,46 @@
import { makeAugmentedSchema } from 'neo4j-graphql-js'
import CONFIG from './../config'
import applyScalars from './../bootstrap/scalars'
import applyDirectives from './../bootstrap/directives'
import typeDefs from './types'
import resolvers from './resolvers'
export default applyScalars(
applyDirectives(
makeAugmentedSchema({
typeDefs,
resolvers,
config: {
query: {
exclude: [
'Badge',
'Embed',
'InvitationCode',
'EmailAddress',
'Notfication',
'Statistics',
'LoggedInUser',
'Location',
'SocialMedia',
'NOTIFIED',
'REPORTED',
'Donations',
],
// add 'User' here as soon as possible
},
mutation: {
exclude: [
'Badge',
'Embed',
'InvitationCode',
'EmailAddress',
'Notfication',
'Post',
'Comment',
'Statistics',
'LoggedInUser',
'Location',
'SocialMedia',
'User',
'EMOTED',
'NOTIFIED',
'REPORTED',
'Donations',
],
// add 'User' here as soon as possible
},
debug: !!CONFIG.DEBUG,
},
}),
),
)
export default makeAugmentedSchema({
typeDefs,
resolvers,
config: {
query: {
exclude: [
'Badge',
'Embed',
'InvitationCode',
'EmailAddress',
'Notfication',
'Statistics',
'LoggedInUser',
'Location',
'SocialMedia',
'NOTIFIED',
'REPORTED',
],
// add 'User' here as soon as possible
},
mutation: {
exclude: [
'Badge',
'Embed',
'InvitationCode',
'EmailAddress',
'Notfication',
'Post',
'Comment',
'Statistics',
'LoggedInUser',
'Location',
'SocialMedia',
'User',
'EMOTED',
'NOTIFIED',
'REPORTED',
],
// add 'User' here as soon as possible
},
},
})