Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delete ctx.nodeMap.Subscription
includeSubscription = false
}
const ops = []
if (includeQuery) {
ops.push(makeOperationType('query', queryNode.name.value))
}
if (includeMutation) {
ops.push(makeOperationType('mutation', mutationNode.name.value))
}
if (includeSubscription) {
ops.push(makeOperationType('subscription', subscriptionNode.name.value))
}
const schema = makeSchema(ops)
ctx.putSchema(schema)
const astSansDirectives = stripDirectives({
kind: 'Document',
definitions: Object.keys(ctx.nodeMap).map((k: string) => ctx.getType(k))
}, ['aws_subscribe', 'aws_auth'])
const SDL = print(astSansDirectives)
return SDL;
}