Skip to content

Conversation

@rsill-neo4j
Copy link
Contributor

this is missing JavaScript examples for processing query data.
i tried, but it wasn't straight-forward to set up something locally (because of the CORS policy) and i got stuck setting up an apache server. at that point i decided to rather ask for help, because my JavaScript certainly would have been lacking anyway ;)

@neo4j-docops-agent
Copy link
Collaborator

This PR includes documentation updates
View the updated docs at https://neo4j-docs-graphql-274.surge.sh

New pages:

Updated pages:

@rsill-neo4j rsill-neo4j marked this pull request as ready for review October 27, 2025 13:49

[source, javascript, indent=0]
----
// JavaScript example
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tba

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is out of scope. We don't want to try to provide code for a full shopping basket.


The product of `quantity` and `unitPrice` is the total cost, which in this case is 116.25.

// maybe add another JavaScript example here, that accesses the JSON response and actually calculates the amount. This could also be made generic, so that it is not reliant on the orderID used here.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tba

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think providing a code example here for calculating the result is out of scope.

* *How-To*
* xref:driver-configuration.adoc[]
* xref:northwind-api.adoc[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's change the name of the page to something else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about "graphql-modeling.adoc" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds nice to me!

Copy link
Member

@angrykoala angrykoala left a comment

Choose a reason for hiding this comment

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

Looks good to me, once the missing examples and other comments have been solved

@MacondoExpress
Copy link
Contributor

Added some suggestions but nothing blocking.

Comment on lines 158 to 184
mutation {
createCustomers(
input: [
{
contactName: "Jane Doe"
}
]
) {
customers {
contactName
}
}
}
----

To make it generic, you can use a link:https://graphql.org/learn/queries/#variables[GraphQL variable] to set the contactName dynamically:

[source, javascript, indent=0]
----
mutation CreateCustomer($contactName: String!) {
createCustomers(input: [{ contactName: $contactName }]) {
customers {
contactName
customerID
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a thought but the formatting/indentation/new lines of these should probably match

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried to make it uniform

Copy link
Contributor

@mjfwebb mjfwebb left a comment

Choose a reason for hiding this comment

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

<3

@rsill-neo4j rsill-neo4j merged commit e5a0c01 into 7.x Nov 7, 2025
@rsill-neo4j rsill-neo4j deleted the northwind-api branch November 7, 2025 08:31
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.

7 participants