Skip to content

Rework getting started pages #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 11, 2025
Merged

Rework getting started pages #273

merged 13 commits into from
Jul 11, 2025

Conversation

rsill-neo4j
Copy link
Contributor

No description provided.

Comment on lines +45 to +46
Alternatively, if you already have data in the AuraDB, you can obtain your type definitions via the https://graphql-toolbox.neo4j.io[Neo4j GraphQL Toolbox].
The toolbox can connect to the AuraDB and automatically create type definitions and allow GraphQL operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note we want to have the introspection feature in the Aura console soon, so this will need to be updated to reflect that when it's added.


[source, javascript, indent=0]
----
const driver = neo4j.driver(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I love that we're hardcoding the credentials here without a note that it's not best practice (anyone with access to your source code now has access to your DB).

Either we just add a warning/note about this risk or we should try to use environment variables e.g.

const {
    NEO4J_URI = "neo4j://localhost:7687/neo4j",
    NEO4J_USERNAME = "neo4j",
    NEO4J_PASSWORD = "password",
} = process.env;

const driver = neo4j.driver(
    NEO4J_URI,
    neo4j.auth.basic(NEO4J_USERNAME, NEO4J_PASSWORD)
);

With this example it's still possible to hardcode to get going quickly but we should prompt the user to not commit real creds and set them using environment variables going forward

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you have any thoughts on this or better ideas @mjfwebb?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of pointing towards using process.env, though I am also hesitant at implying it's "the secure way of doing things" because that really depends on the rest of the setup.

Keeping it hard-coded might be easiest so long as we explicitly state we do not recommend keeping it that way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a note then
the point of the tutorial is to have a minimal working example to get started - let's keep the bar low and the code examples short/simple


To learn more, keep reading the documentation about xref:queries-aggregations/index.adoc[Queries and aggregations] or alternatively learn how to use the xref:getting-started/toolbox.adoc[Neo4j GraphQL Toolbox].
For more advanced database settings, refer to the xref:driver-configuration.adoc[Driver configuration] page.
These pages walks you through creating a new project with the Neo4j GraphQL Library.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These guides are both based on the northwind dataset right?

Is it worth mentioning here or maybe at the end of the guides that as a next step users could try loading that dataset into their db and extending the schema for the full data set to see what that adds to their api?

Ideally we could also write a guide for this in the future too!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i had added a reference to the northwind dataset initially, but the examples work without it so far (or rather, only work when no other data is present). the idea was to go in that direction and make it the default data set for all examples

i'd say, we leave it out for now, and revisit when the picture is more coherent. maybe we could add a page that is specifically about importing and then making the northwind set available to a client via the api

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we can leave for now then. Tbf, I think we'll be able to get to a tutorial for a more complex schema soon anyway and that would be a good time to look at this anyway

@MacondoExpress MacondoExpress self-requested a review July 8, 2025 12:18
Copy link
Contributor

@Liam-Doodson Liam-Doodson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good and is a big improvement!

I've just added one more small comment and would still like to see a note/warning about not hard coding credentials

Other than that though this LGMT

I'd also hold off on merging until @MacondoExpress & @mjfwebb have had a chance to review too though

This tutorial shows you how to create and use a GraphQL Data API in Aura Console.


== Create a GraphQL Data API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding a prerequisite that you need to have already created an AuraDB and linking to the docs on how to do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely - in fact, we have a prerequisites section in the self-hosted page now, the aura page should mirror that

Copy link
Contributor

@MacondoExpress MacondoExpress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a small typo

@neo4j-docops-agent
Copy link
Collaborator

@rsill-neo4j rsill-neo4j merged commit b7b3453 into 7.x Jul 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants