grand-stack-starter
grand-stack-starter copied to clipboard
[inferSchema] Use NEO4J_ENCRYPTED and NEO4J_DATABASE env vars
Currently the inferSchema.js script (which is used by npm run inferschema:write) ignores the NEO4J_ENCRYPTED environment variable and just defaults to unencrypted:
https://github.com/grand-stack/grand-stack-starter/blob/master/scripts/inferSchema.js#L9
Take into account the encryption flag and the NEO4J_DATABASE env var when running this script
As a workaround --encrypted can be manually appended to the call to the grandstack cli if encrypted connection is needed, for example:
node_modules/.bin/grandstack graphql inferschema --neo4j-uri neo4j://07de346a.databases.neo4j.io --neo4j-user summit --neo4j-password summit --schema-file ./api/src/schema.graphql --encrypted
Believe this has been taken care of in latest master but will test to make sure it works: https://github.com/grand-stack/grand-stack-starter/blob/e648d56864b5a82d395504aa799e08e665fbea86/scripts/inferSchema.js#L26