<% // Test output in playground // https://ionicabizau.github.io/ejs-playground/ // Input variables // const configExtension = 'yml'; // const isSdk = true; // Inline variables const name = 'Movies'; const handler = 'neo4j'; const database = 'movies'; const password = 'movies'; const username = 'movies'; const url = 'bolt+s://demo.neo4jlabs.com:7687'; const browser = false; const fileRoot = './src/'; const documents = `${fileRoot}graphql/**/*.*.graphql`; if (configExtension === 'cjs' || configExtension ==='js') { -%> module.exports = { sources: [ { name: '<%= name %>', handler: { <%= handler %>: { database: '<%= database %>', password: '<%= password %>', url: '<%= url %>', username: '<%= username %>', }, }, }, ], serve: { browser: <%= browser %>, }, documents: ['<%= documents %>'], }; <% } else if (configExtension === 'json') { -%> { "sources": [ { "name": "<%= name %>", "handler": { "<%= handler %>": { database: "<%= database %>", password: "<%= password %>", url: "<%= url %>", username: "<%= username %>" } } } ], "serve": { "browser": <%= browser %> }, "documents": ['<%= documents %>'] } <% } else if (configExtension === 'yml') { -%> sources: - name: <%= name %> handler: <%= handler %>: database: <%= database %> password: <%= password %> url: <%= url %> username: <%= username %> serve: browser: false documents: - <%= documents %> <% }-%>