Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function generateSchema() {
// Get the instance of `graphql` that `graphbrainz` sees.
const graphql = require(resolveFrom(
require.resolve('graphbrainz'),
'graphql'
))
const extendedSchema = createSchema(graphBrainzSchema, {
extensions: ['graphbrainz/extensions/cover-art-archive']
})
return schemaToJSON(extendedSchema, { graphql })
}