Skip to content

Commit

Permalink
refactor: remove no longer needed SchemaGenerator class (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
schwma authored Jul 29, 2024
1 parent 06c7bcb commit a56c0cb
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@ const queryGenerator = require('./query')
const mutationGenerator = require('./mutation')
const { GraphQLSchema } = require('graphql')
const { createRootResolvers, registerAliasFieldResolvers } = require('../resolvers')
const { printSchema } = require('graphql')

// REVISIT: remove class with cds^8
class SchemaGenerator {
generate(services) {
this._schema = generateSchema4(services)
return this
}

getSchema() {
return this._schema
}

printSchema() {
return printSchema(this._schema)
}
}

function generateSchema4(services) {
const resolvers = createRootResolvers(services)
Expand All @@ -30,4 +13,4 @@ function generateSchema4(services) {
return schema
}

module.exports = { SchemaGenerator, generateSchema4 }
module.exports = { generateSchema4 }

0 comments on commit a56c0cb

Please sign in to comment.