Ocelot-Social/src/bootstrap/directives.js
Robert Schäfer 15d9178369 Install and configure eslint
Fix all violations but one - there is a mock in our authentication.
2018-12-03 18:05:28 +01:00

17 lines
410 B
JavaScript

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
}